commit e8ea46c6442751118cf89671ee5a03e43bd92504 Author: yujinbing Date: Tue Jul 11 14:04:04 2023 +0800 All code diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..29f81d8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..4b0bda1 --- /dev/null +++ b/README.md @@ -0,0 +1,84 @@ +# 六零导航页 + +#### 项目介绍 +**六零导航页** (LyLme Spage) 致力于简洁高效无广告的上网导航和搜索入口,支持后台添加链接、自定义搜索引擎,沉淀最具价值链接,全站无商业推广,简约而不简单。 + +#### 演示站点 + +[https://hao.lylme.com](https://hao.lylme.com/) + + +#### 安装教程 + +1. 前往[Gitee Releases](https://gitee.com/LyLme/lylme_spage/releases/) 或[Github Releases](https://github.com/LyLme/lylme_spage/releases/) 下载最新版本源码压缩包,上传到网站根目录解压 +2. 访问`http://域名/install` +3. 按提示配置数据库进行安装 +4. 后台地址:`http://域名/admin` +5. 账号密码:`admin`/`123456` + + +#### 通过Docker安装 + +如果你是在 `x86_64 Linux` 架构的机器上安装,已经安装了 [Docker](https://docs.docker.com/engine/install/) 和 [`docker-compose`](https://docs.docker.com/compose/install/) 并且有 Docker 权限,你可以通过脚本快速部署: + +```bash +curl -L 'https://aka.caomingjun.com/lylme/install.sh' | bash +``` + +其他架构未进行测试,可能无法通过脚本部署。 + +如果要安装到其他架构,或者如果你想使用一些进阶玩法,你也可以手动进行 Docker 部署,[这里是教程](https://aka.caomingjun.com/lylme/)。 + + + +#### 项目说明 + + **六零导航页** (LyLme Spage) 整合了一些优秀的导航页,为了让使用和网站管理更方便,增加了后台管理。并修改和优化了部分内容: + +1. 使用PHP+MySql,增加后台管理 +2. 多模板选择,支持在后台切换模板 + +2. 增加常用搜索引擎,如:知乎、哔哩哔哩、在线翻译等(支持自定义) +3. 支持用户提交收录申请,地址:`http://域名/apply` +4. 部分模板优化和增加部分功能,如返回顶部、获取输入框焦点、时间日期显示等 +5. 另外,如果你有更好的建议或者反馈问题欢迎提交Issue! + +#### 背景设置 + +- **每日一图背景:** 六零导航页支持使用Bing每日一图作为背景,接口地址:`/assets/img/bing.php`,但直接调用的`bing.php`返回的图片并不是静态文件,不会产生缓存,会导致后续加载速度慢。 + + 解决方案:修改`/assets/img/cron.php`文件配置秘钥,然后添加一个每天执行的CRON任务:`GET http://域名/assets/img/cron.php` ,执行后会将Bing每日一图保存到`assets/img/background.jpg`,然后在后台修改背景地址为:`./assets/img/background.jpg`即可 + +- **其他背景:** 前往后台设置 + +#### 演示截图 +![截图1](https://cdn.lylme.com/img/lylme_spage/lylme_spage1.png) + +![六零导航页baisuTwo主题PC端截图](https://cdn.lylme.com/img/lylme_spage/image-20220501192454699.png) + +![截图6](https://cdn.lylme.com/img/lylme_spage/lylme_spage6.png) + +![截图2](https://cdn.lylme.com/img/lylme_spage/lylme_spage2.png) +![截图3](https://cdn.lylme.com/img/lylme_spage/lylme_spage3.png) + +![截图4](https://cdn.lylme.com/img/lylme_spage/lylme_spage4.png) + +![截图5](https://cdn.lylme.com/img/lylme_spage/lylme_spage5.png) + +#### 鸣谢 + + **D.Young** + +- 前端:5iux主题和部分前端代码 +- GitHub地址:https://github.com/5iux + +**笔下光年** + +- 后台模板:Light Year Admin +- Gitee地址:https://gitee.com/yinqi/Light-Year-Admin-Template + +**BaiSu** + +- 前端:baisu模板 +- 原项目地址:[baisuTwo: onenav主题 (gitee.com)](https://gitee.com/baisucode/baisu-two) +- Fork仓库:[六零导航页(LyLme Spage)baisu主题,基于baisuTwo开发 (gitee.com)](https://gitee.com/LyLme/baisu) diff --git a/about/about.txt b/about/about.txt new file mode 100644 index 0000000..f0d0faf --- /dev/null +++ b/about/about.txt @@ -0,0 +1,24 @@ +

关于本站

+

感谢来访,本站致力于简洁高效的上网导航和搜索入口,安全快捷。

+

如果您喜欢我们的网站,请将本站添加到收藏夹(快捷键Ctrl+D),并设为浏览器主页,方便您的下次访问,感谢支持。

+


+

本站承诺

+

绝对不会收集用户的隐私信息

+

区别于部分导航网站,本站链接直接跳转目标,不会对链接处理再后跳转,不会收集用户的隐藏信息,包括但不限于点击记录,访问记录和搜索记录,请放心使用

+
+

申请收录

+

请点这里

+
+

联系我们

+

若您在使用本站时遇到了包括但不限于以下问题:

+
  • 图标缺失
  • +
  • 目标网站无法打开
  • +
  • 描述错误
  • +
  • 网站违规
  • +
  • 收录加急处理
  • +
  • 链接删除
  • +

    请发邮件与我们联系

    +
    联系邮箱
    +

    未配置邮箱

    +
    联系说明
    +

    为了您的问题能快速被处理,建议在邮件主题添加【反馈】【投诉】【推荐】【友链】

    \ No newline at end of file diff --git a/about/index.php b/about/index.php new file mode 100644 index 0000000..9fc9c71 --- /dev/null +++ b/about/index.php @@ -0,0 +1,32 @@ + + + + + 关于 - <?php echo explode("-", $conf['title'])[0];?> + + + + + + + +
    +404'); + echo file_get_contents($about); +} +?> + +
    +
    + + \ No newline at end of file diff --git a/about/说明.txt b/about/说明.txt new file mode 100644 index 0000000..73f98c4 --- /dev/null +++ b/about/说明.txt @@ -0,0 +1,34 @@ +请勿删除 about.txt 文件,该文件存放网站关于页面的内容 + +如需修改关于本站的内容请修改about.txt文件,防止更新后index.php文件被覆盖 + +该文件使用HTML语言编写 若您不了解html语言,可使用在线生成 + +html生成:https://www.lylme.com/html + +默认内容如下: + +

    关于本站

    +

    感谢来访,本站致力于简洁高效的上网导航和搜索入口,安全快捷。

    +

    如果您喜欢我们的网站,请将本站添加到收藏夹(快捷键Ctrl+D),并设为浏览器主页,方便您的下次访问,感谢支持。

    +


    +

    本站承诺

    +

    绝对不会收集用户的隐私信息

    +

    区别于部分导航网站,本站链接直接跳转目标,不会对链接处理再后跳转,不会收集用户的隐藏信息,包括但不限于点击记录,访问记录和搜索记录,请放心使用

    +
    +

    申请收录

    +

    请点这里

    +
    +

    联系我们

    +

    若您在使用本站时遇到了包括但不限于以下问题:

    +
  • 图标缺失
  • +
  • 目标网站无法打开
  • +
  • 描述错误
  • +
  • 网站违规
  • +
  • 收录加急处理
  • +
  • 链接删除
  • +

    请发邮件与我们联系

    +
    联系邮箱
    +

    未配置邮箱

    +
    联系说明
    +

    为了您的问题能快速被处理,建议在邮件主题添加【反馈】【投诉】【推荐】【友链】

    \ No newline at end of file diff --git a/admin/ajax_apply.php b/admin/ajax_apply.php new file mode 100644 index 0000000..24d0787 --- /dev/null +++ b/admin/ajax_apply.php @@ -0,0 +1,54 @@ +window.location.href='./login.php';"); +header('Content-Type:application/json'); + +$set= isset($_GET['set']) ? $_GET['set'] : null; +switch($set) { + //修改分组 + case 'status': + $id = $_POST['id']; + $sw = $_POST['status']; + $sql = "UPDATE `lylme_apply` SET `apply_status` = '".$sw."' WHERE `lylme_apply`.`apply_id` = ".$id.";"; + if($sw==1) { + if ($DB->query($sql)) { + $applyres = $DB->get_row("SELECT * FROM `lylme_apply` WHERE `apply_id` = ".$id); + $name=strip_tags(daddslashes($applyres['apply_name'])); + $url=strip_tags(daddslashes($applyres['apply_url'])); + $icon=daddslashes($applyres['apply_icon']); + $group_id=strip_tags(daddslashes($applyres['apply_group'])); + $mail=strip_tags(daddslashes($applyres['apply_mail'])); + $link_order = $DB->count('select MAX(id) from `lylme_links`')+1; + $sql1 = "INSERT INTO `lylme_links` (`id`, `name`, `group_id`, `url`, `icon`, `PS`,`link_order`) VALUES (NULL, '" . $name . "', '" . $group_id . "', '" . $url . "', '" . $icon . "', '" . $mail . "的提交 ', '" . $link_order . "');"; + if($DB->query($sql1)) { + exit('{"code": "200","msg":"成功!网站已成功收录!"}'); + } else { + exit('{"code": "-1","操作失败!原因:\n'.$DB->error().'"}'); + } + } + } else if($sw==2){ + if ($DB->query($sql)) { + exit('{"code": "200","msg":"操作成功!"}'); + } + else{ + exit('{"code": "-1","操作失败!原因:\n'.$DB->error().'"}'); + } + } + else{ + exit('{"code": "-2","操作失败!-2"}'); + } + break; + case 'delete': + $id = $_POST['id']; + $delsql = 'DELETE FROM `lylme_apply` WHERE apply_id =' . $id; + if ($DB->query($delsql)) { + exit('{"code": "200","msg":"操作成功!"}'); + }else{ + exit('{"code": "-2","操作失败!-2"}'); + } + break; + default: + exit('error'); + break; +} \ No newline at end of file diff --git a/admin/ajax_link.php b/admin/ajax_link.php new file mode 100644 index 0000000..f0e641e --- /dev/null +++ b/admin/ajax_link.php @@ -0,0 +1,114 @@ +window.location.href='./login.php';"); +$submit = isset($_GET['submit']) ? $_GET['submit'] : null; +switch($submit) { + + //修改分组 + case 'set_group': + foreach($_POST['links'] as $lk=> $lv) { + $sql = "UPDATE `lylme_links` SET `group_id` = '".$_POST['group_id']."' WHERE `lylme_links`.`id` = ".$lv.";"; + $DB->query($sql); + } + break; + case 'allorder': + //拖拽排序 + for ($i=0; $iquery($sql); + } + break; + case 'pwd_link': + //链接加密 + foreach($_POST['links'] as $lk=> $lv) { + $sql = "UPDATE `lylme_links` SET `link_pwd` = '".$_POST['pwd_id']."' WHERE `lylme_links`.`id` = ".$lv.";"; + $DB->query($sql); + } + break; + case 'on': + //链接启用 + foreach($_POST['links'] as $lk=> $lv) { + $sql = "UPDATE `lylme_links` SET `link_status` = '1' WHERE `lylme_links`.`id` = ".$lv.";"; + $DB->query($sql); + } + break; + case 'off': + //链接禁用 + foreach($_POST['links'] as $lk=> $lv) { + $sql = "UPDATE `lylme_links` SET `link_status` = '0' WHERE `lylme_links`.`id` = ".$lv.";"; + $DB->query($sql); + } + break; + case 'del': + //链接删除 + foreach($_POST['links'] as $lk=> $lv) { + $sql = "DELETE FROM `lylme_links` WHERE `lylme_links`.`id` = ".$lv.";"; + $DB->query($sql); + } + break; + + //获取链接信息 + case 'geturl': + $url = $_GET['url']; + $head = get_head($url); + if(empty($head['title'])&&empty($head['icon']))exit('Unable to access'); + //download_img($url,head['icon']); + header('Content-Type:application/json'); + exit(json_encode($head,JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE)); //输出json + break; + //检测更新 + case 'update': + function zipExtract ($src, $dest) { + $zip = new ZipArchive(); + if ($zip->open($src)===true) { + $zip->extractTo($dest); + $zip->close(); + return true; + } + return false; + } + function deldir($dir) { + if(!is_dir($dir))return false; + $dh=opendir($dir); + while ($file=readdir($dh)) { + if($file!="." && $file!="..") { + $fullpath=$dir."/".$file; + if(!is_dir($fullpath)) { + unlink($fullpath); + } else { + deldir($fullpath); + } + } + } + closedir($dh); + if(rmdir($dir)) { + return true; + } else { + return false; + } + } + $scriptpath=str_replace('\\','/',$_SERVER['SCRIPT_NAME']); + $scriptpath = substr($scriptpath, 0, strrpos($scriptpath, '/')); + $admin_path = substr($scriptpath, strrpos($scriptpath, '/')+1); + $RemoteFile = $_POST['file']; + $ZipFile = "lylme_spage-update.zip"; + copy($RemoteFile,$ZipFile) or die("无从更新服务器下载更新包文件!"); + if (zipExtract($ZipFile,ROOT)) { + if($admin_path!='admin' && is_dir(ROOT.'admin')) { + //修改后台地址 + deldir(ROOT.$admin_path); + rename(ROOT.'admin',ROOT.$admin_path); + } + unlink($ZipFile); + exit ('success'); + } + else { + unlink($ZipFile); + exit('无法解压文件!请手动下载更新包解压'); + } + break; + default: + exit('error'); + break; +} \ No newline at end of file diff --git a/admin/apply.php b/admin/apply.php new file mode 100644 index 0000000..faa8443 --- /dev/null +++ b/admin/apply.php @@ -0,0 +1,260 @@ +num_rows($DB->query("SELECT * FROM `lylme_apply`")); +$grouplists = $DB->query("SELECT * FROM `lylme_groups`"); +?> + + +
    +
    +
    +
    +
    +
    +query("select * from lylme_apply where apply_id='$id' limit 1"); + $row = $DB->fetch($row2); + echo '

    修改链接信息

    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +方式1:填写图标的URL地址,如/img/logo.pnghttp://www.xxx.com/img/logo.png
    +方式2:粘贴图标的SVG代码,查看教程
    方式3:留空使用默认图标
    注:修改为svg代码后审核列表可能存在显示异常,不会影响首页效果,忽略即可!
    + +
    +
    +
    + +
    +
    + +
    +
    <<返回收录管理列表
    '; +} elseif ($set == 'conf') { + echo '

    修改收录设置

    +
    +
    +
    + + + 申请收录开关,地址:'. siteurl().'/apply
    前往申请收录提交页
    +
    +
    + + + 显示在收录页的公告使用HTML代码编写 + 工具:在线MD编辑器 编辑后复制html代码粘贴 +
    +
    + +
    +
    <<返回收录管理列表
    '; + +}elseif ($set == 'conf_submit') { + $apply= $_POST['apply']; + $apply_gg= $_POST['apply_gg']; + saveSetting('apply',$apply); + saveSetting('apply_gg',$apply_gg); + echo ''; +} +elseif ($set == 'edit_submit') { + $id = $_GET['id']; + $rows2 = $DB->query("select * from lylme_apply where apply_id='$id' limit 1"); + $rows = $DB->fetch($rows2); + if (!$rows) echo ''; + $name = $_POST['apply_name']; + $icon = $_POST['apply_icon']; + $url = $_POST['apply_url']; + $group = $_POST['apply_group']; + if ($name == NULL) { + echo ''; + } else { + $sql = "UPDATE `lylme_apply` SET `apply_name` = '" . $name . "', `apply_group` = '" . $group . "',`apply_icon` = '" . $icon . "',`apply_url` = '" . $url . "' WHERE `lylme_apply`.`apply_id` = '" . $id . "';"; + if ($DB->query($sql)) echo ''; else echo ''; + } +} + else { + echo '
    '.$conf['apply_gg'].'
    修改
    '; + echo '
    + 收录申请统计: ' . $applyrows . '
    + 收录申请开关: '; + + switch ($conf['apply']) { + case 0: + echo '开启-需要审核'; + break; + case 1: + echo '开启-无需审核'; + break; + case 2: + echo '关闭-关闭申请'; + break; + } + echo '  修改设置
    + 申请收录地址:'. siteurl().'/apply 访问

    已审核的图标会被隐藏,点击图标可重新加载
    部分网站图标一直处于加载或无法显示,可能原因:无法访问或跨域问题,建议建将图标本地化
    '; + + ?> +
    + + + + query("SELECT * FROM `lylme_apply` ORDER BY `lylme_apply`.`apply_time` DESC"); + $i=0; + while ($res = $DB->fetch($rs)) { + $i++; + echo ' + + '; + } + ?> + +
    序号图标名称链接访问分组审核操作申请时间
    '; + + if($res["apply_status"]==0) {echo ''.$i.'';} + else{echo ''.$i.'';} + echo ''; + if($res["apply_status"]==0) { + if(empty($res["apply_icon"])){ + echo '未提交图标'; + } + else if (preg_match("/^'; + } + } + else{ + echo '' . $res['apply_name'] . '' . $res['apply_url'] .'访问'.$DB->fetch($DB->query("SELECT * FROM `lylme_groups` WHERE `group_id` = " . $res['apply_group'])) ["group_name"].' + '; + if($res["apply_status"]==2) { + echo '已拒绝'; + } else if($res["apply_status"]==1) { + echo '已通过'; + } else { + echo ' +   + '; + if($res["apply_status"]==0) {echo '编辑 ';} + echo ' '.$res['apply_time'].'
    +
    +
    +
    +
    + + +
    + + + + \ No newline at end of file diff --git a/admin/css/bootstrap.min.css b/admin/css/bootstrap.min.css new file mode 100644 index 0000000..63931aa --- /dev/null +++ b/admin/css/bootstrap.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/admin/css/coloris.min.css b/admin/css/coloris.min.css new file mode 100644 index 0000000..fe3033d --- /dev/null +++ b/admin/css/coloris.min.css @@ -0,0 +1 @@ +.clr-picker{display:none;flex-wrap:wrap;position:absolute;width:200px;z-index:1000;border-radius:10px;background-color:#fff;justify-content:space-between;box-shadow:0 0 5px rgba(0,0,0,.05),0 5px 20px rgba(0,0,0,.1);-moz-user-select:none;-webkit-user-select:none;user-select:none}.clr-picker.clr-open{display:flex}.clr-dark{background-color:#444}.clr-gradient{position:relative;width:100%;height:100px;margin-bottom:15px;border-radius:3px 3px 0 0;background-image:linear-gradient(rgba(0,0,0,0),#000),linear-gradient(90deg,#fff,currentColor);cursor:pointer}.clr-marker{position:absolute;width:12px;height:12px;margin:-6px 0 0 -6px;border:1px solid #fff;border-radius:50%;background-color:currentColor;cursor:pointer}.clr-picker input[type=range]::-webkit-slider-runnable-track{width:100%;height:8px}.clr-picker input[type=range]::-webkit-slider-thumb{width:8px;height:8px;-webkit-appearance:none}.clr-picker input[type=range]::-moz-range-track{width:100%;height:8px;border:0}.clr-picker input[type=range]::-moz-range-thumb{width:8px;height:8px;border:0}.clr-hue{background-image:linear-gradient(to right,red 0,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red 100%)}.clr-alpha,.clr-hue{position:relative;width:calc(100% - 40px);height:8px;margin:5px 20px;border-radius:4px}.clr-alpha span{display:block;height:100%;width:100%;border-radius:inherit;background-image:linear-gradient(90deg,rgba(0,0,0,0),currentColor)}.clr-alpha input,.clr-hue input{position:absolute;width:calc(100% + 16px);height:16px;left:-8px;top:-4px;margin:0;background-color:transparent;opacity:0;cursor:pointer;appearance:none;-webkit-appearance:none}.clr-alpha div,.clr-hue div{position:absolute;width:16px;height:16px;left:0;top:0;margin:-4px 0 0 -8px;border:2px solid #fff;border-radius:50%;background-color:currentColor;box-shadow:0 0 1px #888;pointer-events:none}.clr-alpha div:before{content:'';position:absolute;height:100%;width:100%;left:0;top:0;border-radius:50%;background-color:currentColor}.clr-swatches{order:2;width:calc(100% - 40px);margin:0 20px}.clr-swatches div{display:flex;flex-wrap:wrap;padding-bottom:12px;justify-content:center}.clr-swatches button{position:relative;width:20px;height:20px;margin:0 8px 6px 0;border:0;border-radius:50%;color:inherit;text-indent:-1000px;white-space:nowrap;overflow:hidden;cursor:pointer}.clr-swatches button:last-child,.clr-swatches button:nth-child(6n){margin-right:0}.clr-swatches button:after{content:'';display:block;position:absolute;width:100%;height:100%;left:0;top:0;border-radius:inherit;background-color:currentColor;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.clr-dark .clr-swatches button:after{box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)}input.clr-color{order:1;width:120px;height:32px;margin:15px 20px 15px 0;padding:0 15px;border:1px solid #ddd;border-radius:16px;color:#444;background-color:#fff;font-family:sans-serif;font-size:14px;text-align:left;box-shadow:none}.clr-dark input.clr-color{color:#fff;border-color:#777;background-color:#555}input.clr-color:focus{outline:0;border:1px solid #aaa}.clr-preview{position:relative;width:32px;height:32px;margin:15px 0 20px 20px;border:0;border-radius:50%;overflow:hidden;cursor:pointer}.clr-preview:after,.clr-preview:before{content:'';position:absolute;height:100%;width:100%;left:0;top:0;border:1px solid #fff;border-radius:50%}.clr-preview:after{border:0;background-color:currentColor;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.clr-dark .clr-preview:after{box-shadow:inset 0 0 0 1px rgba(255,255,255,.5)}.clr-alpha div,.clr-color,.clr-hue div,.clr-marker{box-sizing:border-box}.clr-field{display:inline-block;position:relative;color:#000}.clr-field button{position:absolute;width:30px;height:100%;right:0;top:50%;transform:translateY(-50%);border:0;color:inherit;text-indent:-1000px;white-space:nowrap;overflow:hidden;pointer-events:none}.clr-field button:after{content:'';display:block;position:absolute;width:100%;height:100%;left:0;top:0;border-radius:inherit;background-color:currentColor;box-shadow:inset 0 0 1px rgba(0,0,0,.5)}.clr-alpha,.clr-alpha div,.clr-field button,.clr-preview:before,.clr-swatches button{background-image:repeating-linear-gradient(45deg,#aaa 25%,transparent 25%,transparent 75%,#aaa 75%,#aaa),repeating-linear-gradient(45deg,#aaa 25%,#fff 25%,#fff 75%,#aaa 75%,#aaa);background-position:0 0,4px 4px;background-size:8px 8px}.clr-marker:focus{outline:0}.clr-keyboard-nav .clr-alpha input:focus+div,.clr-keyboard-nav .clr-hue input:focus+div,.clr-keyboard-nav .clr-marker:focus{outline:0;box-shadow:0 0 0 2px #1e90ff,0 0 2px 2px #fff} \ No newline at end of file diff --git a/admin/css/materialdesignicons.min.css b/admin/css/materialdesignicons.min.css new file mode 100644 index 0000000..1ee968e --- /dev/null +++ b/admin/css/materialdesignicons.min.css @@ -0,0 +1 @@ +/* MaterialDesignIcons.com */@font-face{font-family:"Material Design Icons";src:url("../fonts/materialdesignicons.eot?v=2.0.46");src:url("../fonts/materialdesignicons.eot?#iefix&v=2.0.46") format("embedded-opentype"),url("../fonts/materialdesignicons.woff2?v=2.0.46") format("woff2"),url("../fonts/materialdesignicons.woff?v=2.0.46") format("woff"),url("../fonts/materialdesignicons.ttf?v=2.0.46") format("truetype"),url("../fonts/materialdesignicons.svg?v=2.0.46#materialdesigniconsregular") format("svg");font-weight:normal;font-style:normal}.mdi:before,.mdi-set{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mdi-access-point:before{content:"\F002"}.mdi-access-point-network:before{content:"\F003"}.mdi-account:before{content:"\F004"}.mdi-account-alert:before{content:"\F005"}.mdi-account-box:before{content:"\F006"}.mdi-account-box-outline:before{content:"\F007"}.mdi-account-card-details:before{content:"\F5D2"}.mdi-account-check:before{content:"\F008"}.mdi-account-circle:before{content:"\F009"}.mdi-account-convert:before{content:"\F00A"}.mdi-account-edit:before{content:"\F6BB"}.mdi-account-key:before{content:"\F00B"}.mdi-account-location:before{content:"\F00C"}.mdi-account-minus:before{content:"\F00D"}.mdi-account-multiple:before{content:"\F00E"}.mdi-account-multiple-minus:before{content:"\F5D3"}.mdi-account-multiple-outline:before{content:"\F00F"}.mdi-account-multiple-plus:before{content:"\F010"}.mdi-account-network:before{content:"\F011"}.mdi-account-off:before{content:"\F012"}.mdi-account-outline:before{content:"\F013"}.mdi-account-plus:before{content:"\F014"}.mdi-account-remove:before{content:"\F015"}.mdi-account-search:before{content:"\F016"}.mdi-account-settings:before{content:"\F630"}.mdi-account-settings-variant:before{content:"\F631"}.mdi-account-star:before{content:"\F017"}.mdi-account-switch:before{content:"\F019"}.mdi-adjust:before{content:"\F01A"}.mdi-air-conditioner:before{content:"\F01B"}.mdi-airballoon:before{content:"\F01C"}.mdi-airplane:before{content:"\F01D"}.mdi-airplane-landing:before{content:"\F5D4"}.mdi-airplane-off:before{content:"\F01E"}.mdi-airplane-takeoff:before{content:"\F5D5"}.mdi-airplay:before{content:"\F01F"}.mdi-alarm:before{content:"\F020"}.mdi-alarm-bell:before{content:"\F78D"}.mdi-alarm-check:before{content:"\F021"}.mdi-alarm-light:before{content:"\F78E"}.mdi-alarm-multiple:before{content:"\F022"}.mdi-alarm-off:before{content:"\F023"}.mdi-alarm-plus:before{content:"\F024"}.mdi-alarm-snooze:before{content:"\F68D"}.mdi-album:before{content:"\F025"}.mdi-alert:before{content:"\F026"}.mdi-alert-box:before{content:"\F027"}.mdi-alert-circle:before{content:"\F028"}.mdi-alert-circle-outline:before{content:"\F5D6"}.mdi-alert-decagram:before{content:"\F6BC"}.mdi-alert-octagon:before{content:"\F029"}.mdi-alert-octagram:before{content:"\F766"}.mdi-alert-outline:before{content:"\F02A"}.mdi-all-inclusive:before{content:"\F6BD"}.mdi-alpha:before{content:"\F02B"}.mdi-alphabetical:before{content:"\F02C"}.mdi-altimeter:before{content:"\F5D7"}.mdi-amazon:before{content:"\F02D"}.mdi-amazon-clouddrive:before{content:"\F02E"}.mdi-ambulance:before{content:"\F02F"}.mdi-amplifier:before{content:"\F030"}.mdi-anchor:before{content:"\F031"}.mdi-android:before{content:"\F032"}.mdi-android-debug-bridge:before{content:"\F033"}.mdi-android-head:before{content:"\F78F"}.mdi-android-studio:before{content:"\F034"}.mdi-angular:before{content:"\F6B1"}.mdi-angularjs:before{content:"\F6BE"}.mdi-animation:before{content:"\F5D8"}.mdi-apple:before{content:"\F035"}.mdi-apple-finder:before{content:"\F036"}.mdi-apple-ios:before{content:"\F037"}.mdi-apple-keyboard-caps:before{content:"\F632"}.mdi-apple-keyboard-command:before{content:"\F633"}.mdi-apple-keyboard-control:before{content:"\F634"}.mdi-apple-keyboard-option:before{content:"\F635"}.mdi-apple-keyboard-shift:before{content:"\F636"}.mdi-apple-mobileme:before{content:"\F038"}.mdi-apple-safari:before{content:"\F039"}.mdi-application:before{content:"\F614"}.mdi-approval:before{content:"\F790"}.mdi-apps:before{content:"\F03B"}.mdi-archive:before{content:"\F03C"}.mdi-arrange-bring-forward:before{content:"\F03D"}.mdi-arrange-bring-to-front:before{content:"\F03E"}.mdi-arrange-send-backward:before{content:"\F03F"}.mdi-arrange-send-to-back:before{content:"\F040"}.mdi-arrow-all:before{content:"\F041"}.mdi-arrow-bottom-left:before{content:"\F042"}.mdi-arrow-bottom-right:before{content:"\F043"}.mdi-arrow-collapse:before{content:"\F615"}.mdi-arrow-collapse-all:before{content:"\F044"}.mdi-arrow-collapse-down:before{content:"\F791"}.mdi-arrow-collapse-left:before{content:"\F792"}.mdi-arrow-collapse-right:before{content:"\F793"}.mdi-arrow-collapse-up:before{content:"\F794"}.mdi-arrow-down:before{content:"\F045"}.mdi-arrow-down-bold:before{content:"\F72D"}.mdi-arrow-down-bold-box:before{content:"\F72E"}.mdi-arrow-down-bold-box-outline:before{content:"\F72F"}.mdi-arrow-down-bold-circle:before{content:"\F047"}.mdi-arrow-down-bold-circle-outline:before{content:"\F048"}.mdi-arrow-down-bold-hexagon-outline:before{content:"\F049"}.mdi-arrow-down-box:before{content:"\F6BF"}.mdi-arrow-down-drop-circle:before{content:"\F04A"}.mdi-arrow-down-drop-circle-outline:before{content:"\F04B"}.mdi-arrow-down-thick:before{content:"\F046"}.mdi-arrow-expand:before{content:"\F616"}.mdi-arrow-expand-all:before{content:"\F04C"}.mdi-arrow-expand-down:before{content:"\F795"}.mdi-arrow-expand-left:before{content:"\F796"}.mdi-arrow-expand-right:before{content:"\F797"}.mdi-arrow-expand-up:before{content:"\F798"}.mdi-arrow-left:before{content:"\F04D"}.mdi-arrow-left-bold:before{content:"\F730"}.mdi-arrow-left-bold-box:before{content:"\F731"}.mdi-arrow-left-bold-box-outline:before{content:"\F732"}.mdi-arrow-left-bold-circle:before{content:"\F04F"}.mdi-arrow-left-bold-circle-outline:before{content:"\F050"}.mdi-arrow-left-bold-hexagon-outline:before{content:"\F051"}.mdi-arrow-left-box:before{content:"\F6C0"}.mdi-arrow-left-drop-circle:before{content:"\F052"}.mdi-arrow-left-drop-circle-outline:before{content:"\F053"}.mdi-arrow-left-thick:before{content:"\F04E"}.mdi-arrow-right:before{content:"\F054"}.mdi-arrow-right-bold:before{content:"\F733"}.mdi-arrow-right-bold-box:before{content:"\F734"}.mdi-arrow-right-bold-box-outline:before{content:"\F735"}.mdi-arrow-right-bold-circle:before{content:"\F056"}.mdi-arrow-right-bold-circle-outline:before{content:"\F057"}.mdi-arrow-right-bold-hexagon-outline:before{content:"\F058"}.mdi-arrow-right-box:before{content:"\F6C1"}.mdi-arrow-right-drop-circle:before{content:"\F059"}.mdi-arrow-right-drop-circle-outline:before{content:"\F05A"}.mdi-arrow-right-thick:before{content:"\F055"}.mdi-arrow-top-left:before{content:"\F05B"}.mdi-arrow-top-right:before{content:"\F05C"}.mdi-arrow-up:before{content:"\F05D"}.mdi-arrow-up-bold:before{content:"\F736"}.mdi-arrow-up-bold-box:before{content:"\F737"}.mdi-arrow-up-bold-box-outline:before{content:"\F738"}.mdi-arrow-up-bold-circle:before{content:"\F05F"}.mdi-arrow-up-bold-circle-outline:before{content:"\F060"}.mdi-arrow-up-bold-hexagon-outline:before{content:"\F061"}.mdi-arrow-up-box:before{content:"\F6C2"}.mdi-arrow-up-drop-circle:before{content:"\F062"}.mdi-arrow-up-drop-circle-outline:before{content:"\F063"}.mdi-arrow-up-thick:before{content:"\F05E"}.mdi-assistant:before{content:"\F064"}.mdi-asterisk:before{content:"\F6C3"}.mdi-at:before{content:"\F065"}.mdi-atom:before{content:"\F767"}.mdi-attachment:before{content:"\F066"}.mdi-audiobook:before{content:"\F067"}.mdi-auto-fix:before{content:"\F068"}.mdi-auto-upload:before{content:"\F069"}.mdi-autorenew:before{content:"\F06A"}.mdi-av-timer:before{content:"\F06B"}.mdi-baby:before{content:"\F06C"}.mdi-baby-buggy:before{content:"\F68E"}.mdi-backburger:before{content:"\F06D"}.mdi-backspace:before{content:"\F06E"}.mdi-backup-restore:before{content:"\F06F"}.mdi-bandcamp:before{content:"\F674"}.mdi-bank:before{content:"\F070"}.mdi-barcode:before{content:"\F071"}.mdi-barcode-scan:before{content:"\F072"}.mdi-barley:before{content:"\F073"}.mdi-barrel:before{content:"\F074"}.mdi-basecamp:before{content:"\F075"}.mdi-basket:before{content:"\F076"}.mdi-basket-fill:before{content:"\F077"}.mdi-basket-unfill:before{content:"\F078"}.mdi-battery:before{content:"\F079"}.mdi-battery-10:before{content:"\F07A"}.mdi-battery-20:before{content:"\F07B"}.mdi-battery-30:before{content:"\F07C"}.mdi-battery-40:before{content:"\F07D"}.mdi-battery-50:before{content:"\F07E"}.mdi-battery-60:before{content:"\F07F"}.mdi-battery-70:before{content:"\F080"}.mdi-battery-80:before{content:"\F081"}.mdi-battery-90:before{content:"\F082"}.mdi-battery-alert:before{content:"\F083"}.mdi-battery-charging:before{content:"\F084"}.mdi-battery-charging-100:before{content:"\F085"}.mdi-battery-charging-20:before{content:"\F086"}.mdi-battery-charging-30:before{content:"\F087"}.mdi-battery-charging-40:before{content:"\F088"}.mdi-battery-charging-60:before{content:"\F089"}.mdi-battery-charging-80:before{content:"\F08A"}.mdi-battery-charging-90:before{content:"\F08B"}.mdi-battery-minus:before{content:"\F08C"}.mdi-battery-negative:before{content:"\F08D"}.mdi-battery-outline:before{content:"\F08E"}.mdi-battery-plus:before{content:"\F08F"}.mdi-battery-positive:before{content:"\F090"}.mdi-battery-unknown:before{content:"\F091"}.mdi-beach:before{content:"\F092"}.mdi-beaker:before{content:"\F68F"}.mdi-beats:before{content:"\F097"}.mdi-beer:before{content:"\F098"}.mdi-behance:before{content:"\F099"}.mdi-bell:before{content:"\F09A"}.mdi-bell-off:before{content:"\F09B"}.mdi-bell-outline:before{content:"\F09C"}.mdi-bell-plus:before{content:"\F09D"}.mdi-bell-ring:before{content:"\F09E"}.mdi-bell-ring-outline:before{content:"\F09F"}.mdi-bell-sleep:before{content:"\F0A0"}.mdi-beta:before{content:"\F0A1"}.mdi-bible:before{content:"\F0A2"}.mdi-bike:before{content:"\F0A3"}.mdi-bing:before{content:"\F0A4"}.mdi-binoculars:before{content:"\F0A5"}.mdi-bio:before{content:"\F0A6"}.mdi-biohazard:before{content:"\F0A7"}.mdi-bitbucket:before{content:"\F0A8"}.mdi-black-mesa:before{content:"\F0A9"}.mdi-blackberry:before{content:"\F0AA"}.mdi-blender:before{content:"\F0AB"}.mdi-blinds:before{content:"\F0AC"}.mdi-block-helper:before{content:"\F0AD"}.mdi-blogger:before{content:"\F0AE"}.mdi-bluetooth:before{content:"\F0AF"}.mdi-bluetooth-audio:before{content:"\F0B0"}.mdi-bluetooth-connect:before{content:"\F0B1"}.mdi-bluetooth-off:before{content:"\F0B2"}.mdi-bluetooth-settings:before{content:"\F0B3"}.mdi-bluetooth-transfer:before{content:"\F0B4"}.mdi-blur:before{content:"\F0B5"}.mdi-blur-linear:before{content:"\F0B6"}.mdi-blur-off:before{content:"\F0B7"}.mdi-blur-radial:before{content:"\F0B8"}.mdi-bomb:before{content:"\F690"}.mdi-bomb-off:before{content:"\F6C4"}.mdi-bone:before{content:"\F0B9"}.mdi-book:before{content:"\F0BA"}.mdi-book-minus:before{content:"\F5D9"}.mdi-book-multiple:before{content:"\F0BB"}.mdi-book-multiple-variant:before{content:"\F0BC"}.mdi-book-open:before{content:"\F0BD"}.mdi-book-open-page-variant:before{content:"\F5DA"}.mdi-book-open-variant:before{content:"\F0BE"}.mdi-book-plus:before{content:"\F5DB"}.mdi-book-secure:before{content:"\F799"}.mdi-book-unsecure:before{content:"\F79A"}.mdi-book-variant:before{content:"\F0BF"}.mdi-bookmark:before{content:"\F0C0"}.mdi-bookmark-check:before{content:"\F0C1"}.mdi-bookmark-music:before{content:"\F0C2"}.mdi-bookmark-outline:before{content:"\F0C3"}.mdi-bookmark-plus:before{content:"\F0C5"}.mdi-bookmark-plus-outline:before{content:"\F0C4"}.mdi-bookmark-remove:before{content:"\F0C6"}.mdi-boombox:before{content:"\F5DC"}.mdi-bootstrap:before{content:"\F6C5"}.mdi-border-all:before{content:"\F0C7"}.mdi-border-bottom:before{content:"\F0C8"}.mdi-border-color:before{content:"\F0C9"}.mdi-border-horizontal:before{content:"\F0CA"}.mdi-border-inside:before{content:"\F0CB"}.mdi-border-left:before{content:"\F0CC"}.mdi-border-none:before{content:"\F0CD"}.mdi-border-outside:before{content:"\F0CE"}.mdi-border-right:before{content:"\F0CF"}.mdi-border-style:before{content:"\F0D0"}.mdi-border-top:before{content:"\F0D1"}.mdi-border-vertical:before{content:"\F0D2"}.mdi-bow-tie:before{content:"\F677"}.mdi-bowl:before{content:"\F617"}.mdi-bowling:before{content:"\F0D3"}.mdi-box:before{content:"\F0D4"}.mdi-box-cutter:before{content:"\F0D5"}.mdi-box-shadow:before{content:"\F637"}.mdi-bridge:before{content:"\F618"}.mdi-briefcase:before{content:"\F0D6"}.mdi-briefcase-check:before{content:"\F0D7"}.mdi-briefcase-download:before{content:"\F0D8"}.mdi-briefcase-upload:before{content:"\F0D9"}.mdi-brightness-1:before{content:"\F0DA"}.mdi-brightness-2:before{content:"\F0DB"}.mdi-brightness-3:before{content:"\F0DC"}.mdi-brightness-4:before{content:"\F0DD"}.mdi-brightness-5:before{content:"\F0DE"}.mdi-brightness-6:before{content:"\F0DF"}.mdi-brightness-7:before{content:"\F0E0"}.mdi-brightness-auto:before{content:"\F0E1"}.mdi-broom:before{content:"\F0E2"}.mdi-brush:before{content:"\F0E3"}.mdi-buffer:before{content:"\F619"}.mdi-bug:before{content:"\F0E4"}.mdi-bulletin-board:before{content:"\F0E5"}.mdi-bullhorn:before{content:"\F0E6"}.mdi-bullseye:before{content:"\F5DD"}.mdi-burst-mode:before{content:"\F5DE"}.mdi-bus:before{content:"\F0E7"}.mdi-bus-articulated-end:before{content:"\F79B"}.mdi-bus-articulated-front:before{content:"\F79C"}.mdi-bus-double-decker:before{content:"\F79D"}.mdi-bus-school:before{content:"\F79E"}.mdi-bus-side:before{content:"\F79F"}.mdi-cached:before{content:"\F0E8"}.mdi-cake:before{content:"\F0E9"}.mdi-cake-layered:before{content:"\F0EA"}.mdi-cake-variant:before{content:"\F0EB"}.mdi-calculator:before{content:"\F0EC"}.mdi-calendar:before{content:"\F0ED"}.mdi-calendar-blank:before{content:"\F0EE"}.mdi-calendar-check:before{content:"\F0EF"}.mdi-calendar-clock:before{content:"\F0F0"}.mdi-calendar-multiple:before{content:"\F0F1"}.mdi-calendar-multiple-check:before{content:"\F0F2"}.mdi-calendar-plus:before{content:"\F0F3"}.mdi-calendar-question:before{content:"\F691"}.mdi-calendar-range:before{content:"\F678"}.mdi-calendar-remove:before{content:"\F0F4"}.mdi-calendar-text:before{content:"\F0F5"}.mdi-calendar-today:before{content:"\F0F6"}.mdi-call-made:before{content:"\F0F7"}.mdi-call-merge:before{content:"\F0F8"}.mdi-call-missed:before{content:"\F0F9"}.mdi-call-received:before{content:"\F0FA"}.mdi-call-split:before{content:"\F0FB"}.mdi-camcorder:before{content:"\F0FC"}.mdi-camcorder-box:before{content:"\F0FD"}.mdi-camcorder-box-off:before{content:"\F0FE"}.mdi-camcorder-off:before{content:"\F0FF"}.mdi-camera:before{content:"\F100"}.mdi-camera-burst:before{content:"\F692"}.mdi-camera-enhance:before{content:"\F101"}.mdi-camera-front:before{content:"\F102"}.mdi-camera-front-variant:before{content:"\F103"}.mdi-camera-gopro:before{content:"\F7A0"}.mdi-camera-iris:before{content:"\F104"}.mdi-camera-metering-center:before{content:"\F7A1"}.mdi-camera-metering-matrix:before{content:"\F7A2"}.mdi-camera-metering-partial:before{content:"\F7A3"}.mdi-camera-metering-spot:before{content:"\F7A4"}.mdi-camera-off:before{content:"\F5DF"}.mdi-camera-party-mode:before{content:"\F105"}.mdi-camera-rear:before{content:"\F106"}.mdi-camera-rear-variant:before{content:"\F107"}.mdi-camera-switch:before{content:"\F108"}.mdi-camera-timer:before{content:"\F109"}.mdi-cancel:before{content:"\F739"}.mdi-candle:before{content:"\F5E2"}.mdi-candycane:before{content:"\F10A"}.mdi-cannabis:before{content:"\F7A5"}.mdi-car:before{content:"\F10B"}.mdi-car-battery:before{content:"\F10C"}.mdi-car-connected:before{content:"\F10D"}.mdi-car-convertable:before{content:"\F7A6"}.mdi-car-estate:before{content:"\F7A7"}.mdi-car-hatchback:before{content:"\F7A8"}.mdi-car-pickup:before{content:"\F7A9"}.mdi-car-side:before{content:"\F7AA"}.mdi-car-sports:before{content:"\F7AB"}.mdi-car-wash:before{content:"\F10E"}.mdi-caravan:before{content:"\F7AC"}.mdi-cards:before{content:"\F638"}.mdi-cards-outline:before{content:"\F639"}.mdi-cards-playing-outline:before{content:"\F63A"}.mdi-cards-variant:before{content:"\F6C6"}.mdi-carrot:before{content:"\F10F"}.mdi-cart:before{content:"\F110"}.mdi-cart-off:before{content:"\F66B"}.mdi-cart-outline:before{content:"\F111"}.mdi-cart-plus:before{content:"\F112"}.mdi-case-sensitive-alt:before{content:"\F113"}.mdi-cash:before{content:"\F114"}.mdi-cash-100:before{content:"\F115"}.mdi-cash-multiple:before{content:"\F116"}.mdi-cash-usd:before{content:"\F117"}.mdi-cast:before{content:"\F118"}.mdi-cast-connected:before{content:"\F119"}.mdi-cast-off:before{content:"\F789"}.mdi-castle:before{content:"\F11A"}.mdi-cat:before{content:"\F11B"}.mdi-cctv:before{content:"\F7AD"}.mdi-ceiling-light:before{content:"\F768"}.mdi-cellphone:before{content:"\F11C"}.mdi-cellphone-android:before{content:"\F11D"}.mdi-cellphone-basic:before{content:"\F11E"}.mdi-cellphone-dock:before{content:"\F11F"}.mdi-cellphone-iphone:before{content:"\F120"}.mdi-cellphone-link:before{content:"\F121"}.mdi-cellphone-link-off:before{content:"\F122"}.mdi-cellphone-settings:before{content:"\F123"}.mdi-certificate:before{content:"\F124"}.mdi-chair-school:before{content:"\F125"}.mdi-chart-arc:before{content:"\F126"}.mdi-chart-areaspline:before{content:"\F127"}.mdi-chart-bar:before{content:"\F128"}.mdi-chart-bar-stacked:before{content:"\F769"}.mdi-chart-bubble:before{content:"\F5E3"}.mdi-chart-donut:before{content:"\F7AE"}.mdi-chart-donut-variant:before{content:"\F7AF"}.mdi-chart-gantt:before{content:"\F66C"}.mdi-chart-histogram:before{content:"\F129"}.mdi-chart-line:before{content:"\F12A"}.mdi-chart-line-stacked:before{content:"\F76A"}.mdi-chart-line-variant:before{content:"\F7B0"}.mdi-chart-pie:before{content:"\F12B"}.mdi-chart-scatterplot-hexbin:before{content:"\F66D"}.mdi-chart-timeline:before{content:"\F66E"}.mdi-check:before{content:"\F12C"}.mdi-check-all:before{content:"\F12D"}.mdi-check-circle:before{content:"\F5E0"}.mdi-check-circle-outline:before{content:"\F5E1"}.mdi-checkbox-blank:before{content:"\F12E"}.mdi-checkbox-blank-circle:before{content:"\F12F"}.mdi-checkbox-blank-circle-outline:before{content:"\F130"}.mdi-checkbox-blank-outline:before{content:"\F131"}.mdi-checkbox-marked:before{content:"\F132"}.mdi-checkbox-marked-circle:before{content:"\F133"}.mdi-checkbox-marked-circle-outline:before{content:"\F134"}.mdi-checkbox-marked-outline:before{content:"\F135"}.mdi-checkbox-multiple-blank:before{content:"\F136"}.mdi-checkbox-multiple-blank-circle:before{content:"\F63B"}.mdi-checkbox-multiple-blank-circle-outline:before{content:"\F63C"}.mdi-checkbox-multiple-blank-outline:before{content:"\F137"}.mdi-checkbox-multiple-marked:before{content:"\F138"}.mdi-checkbox-multiple-marked-circle:before{content:"\F63D"}.mdi-checkbox-multiple-marked-circle-outline:before{content:"\F63E"}.mdi-checkbox-multiple-marked-outline:before{content:"\F139"}.mdi-checkerboard:before{content:"\F13A"}.mdi-chemical-weapon:before{content:"\F13B"}.mdi-chevron-double-down:before{content:"\F13C"}.mdi-chevron-double-left:before{content:"\F13D"}.mdi-chevron-double-right:before{content:"\F13E"}.mdi-chevron-double-up:before{content:"\F13F"}.mdi-chevron-down:before{content:"\F140"}.mdi-chevron-left:before{content:"\F141"}.mdi-chevron-right:before{content:"\F142"}.mdi-chevron-up:before{content:"\F143"}.mdi-chili-hot:before{content:"\F7B1"}.mdi-chili-medium:before{content:"\F7B2"}.mdi-chili-mild:before{content:"\F7B3"}.mdi-chip:before{content:"\F61A"}.mdi-church:before{content:"\F144"}.mdi-circle:before{content:"\F764"}.mdi-circle-outline:before{content:"\F765"}.mdi-cisco-webex:before{content:"\F145"}.mdi-city:before{content:"\F146"}.mdi-clipboard:before{content:"\F147"}.mdi-clipboard-account:before{content:"\F148"}.mdi-clipboard-alert:before{content:"\F149"}.mdi-clipboard-arrow-down:before{content:"\F14A"}.mdi-clipboard-arrow-left:before{content:"\F14B"}.mdi-clipboard-check:before{content:"\F14C"}.mdi-clipboard-flow:before{content:"\F6C7"}.mdi-clipboard-outline:before{content:"\F14D"}.mdi-clipboard-plus:before{content:"\F750"}.mdi-clipboard-text:before{content:"\F14E"}.mdi-clippy:before{content:"\F14F"}.mdi-clock:before{content:"\F150"}.mdi-clock-alert:before{content:"\F5CE"}.mdi-clock-end:before{content:"\F151"}.mdi-clock-fast:before{content:"\F152"}.mdi-clock-in:before{content:"\F153"}.mdi-clock-out:before{content:"\F154"}.mdi-clock-start:before{content:"\F155"}.mdi-close:before{content:"\F156"}.mdi-close-box:before{content:"\F157"}.mdi-close-box-outline:before{content:"\F158"}.mdi-close-circle:before{content:"\F159"}.mdi-close-circle-outline:before{content:"\F15A"}.mdi-close-network:before{content:"\F15B"}.mdi-close-octagon:before{content:"\F15C"}.mdi-close-octagon-outline:before{content:"\F15D"}.mdi-close-outline:before{content:"\F6C8"}.mdi-closed-caption:before{content:"\F15E"}.mdi-cloud:before{content:"\F15F"}.mdi-cloud-braces:before{content:"\F7B4"}.mdi-cloud-check:before{content:"\F160"}.mdi-cloud-circle:before{content:"\F161"}.mdi-cloud-download:before{content:"\F162"}.mdi-cloud-off-outline:before{content:"\F164"}.mdi-cloud-outline:before{content:"\F163"}.mdi-cloud-print:before{content:"\F165"}.mdi-cloud-print-outline:before{content:"\F166"}.mdi-cloud-sync:before{content:"\F63F"}.mdi-cloud-tags:before{content:"\F7B5"}.mdi-cloud-upload:before{content:"\F167"}.mdi-code-array:before{content:"\F168"}.mdi-code-braces:before{content:"\F169"}.mdi-code-brackets:before{content:"\F16A"}.mdi-code-equal:before{content:"\F16B"}.mdi-code-greater-than:before{content:"\F16C"}.mdi-code-greater-than-or-equal:before{content:"\F16D"}.mdi-code-less-than:before{content:"\F16E"}.mdi-code-less-than-or-equal:before{content:"\F16F"}.mdi-code-not-equal:before{content:"\F170"}.mdi-code-not-equal-variant:before{content:"\F171"}.mdi-code-parentheses:before{content:"\F172"}.mdi-code-string:before{content:"\F173"}.mdi-code-tags:before{content:"\F174"}.mdi-code-tags-check:before{content:"\F693"}.mdi-codepen:before{content:"\F175"}.mdi-coffee:before{content:"\F176"}.mdi-coffee-outline:before{content:"\F6C9"}.mdi-coffee-to-go:before{content:"\F177"}.mdi-coin:before{content:"\F178"}.mdi-coins:before{content:"\F694"}.mdi-collage:before{content:"\F640"}.mdi-color-helper:before{content:"\F179"}.mdi-comment:before{content:"\F17A"}.mdi-comment-account:before{content:"\F17B"}.mdi-comment-account-outline:before{content:"\F17C"}.mdi-comment-alert:before{content:"\F17D"}.mdi-comment-alert-outline:before{content:"\F17E"}.mdi-comment-check:before{content:"\F17F"}.mdi-comment-check-outline:before{content:"\F180"}.mdi-comment-multiple-outline:before{content:"\F181"}.mdi-comment-outline:before{content:"\F182"}.mdi-comment-plus-outline:before{content:"\F183"}.mdi-comment-processing:before{content:"\F184"}.mdi-comment-processing-outline:before{content:"\F185"}.mdi-comment-question-outline:before{content:"\F186"}.mdi-comment-remove-outline:before{content:"\F187"}.mdi-comment-text:before{content:"\F188"}.mdi-comment-text-outline:before{content:"\F189"}.mdi-compare:before{content:"\F18A"}.mdi-compass:before{content:"\F18B"}.mdi-compass-outline:before{content:"\F18C"}.mdi-console:before{content:"\F18D"}.mdi-console-line:before{content:"\F7B6"}.mdi-contact-mail:before{content:"\F18E"}.mdi-contacts:before{content:"\F6CA"}.mdi-content-copy:before{content:"\F18F"}.mdi-content-cut:before{content:"\F190"}.mdi-content-duplicate:before{content:"\F191"}.mdi-content-paste:before{content:"\F192"}.mdi-content-save:before{content:"\F193"}.mdi-content-save-all:before{content:"\F194"}.mdi-content-save-settings:before{content:"\F61B"}.mdi-contrast:before{content:"\F195"}.mdi-contrast-box:before{content:"\F196"}.mdi-contrast-circle:before{content:"\F197"}.mdi-cookie:before{content:"\F198"}.mdi-copyright:before{content:"\F5E6"}.mdi-corn:before{content:"\F7B7"}.mdi-counter:before{content:"\F199"}.mdi-cow:before{content:"\F19A"}.mdi-creation:before{content:"\F1C9"}.mdi-credit-card:before{content:"\F19B"}.mdi-credit-card-multiple:before{content:"\F19C"}.mdi-credit-card-off:before{content:"\F5E4"}.mdi-credit-card-plus:before{content:"\F675"}.mdi-credit-card-scan:before{content:"\F19D"}.mdi-crop:before{content:"\F19E"}.mdi-crop-free:before{content:"\F19F"}.mdi-crop-landscape:before{content:"\F1A0"}.mdi-crop-portrait:before{content:"\F1A1"}.mdi-crop-rotate:before{content:"\F695"}.mdi-crop-square:before{content:"\F1A2"}.mdi-crosshairs:before{content:"\F1A3"}.mdi-crosshairs-gps:before{content:"\F1A4"}.mdi-crown:before{content:"\F1A5"}.mdi-cube:before{content:"\F1A6"}.mdi-cube-outline:before{content:"\F1A7"}.mdi-cube-send:before{content:"\F1A8"}.mdi-cube-unfolded:before{content:"\F1A9"}.mdi-cup:before{content:"\F1AA"}.mdi-cup-off:before{content:"\F5E5"}.mdi-cup-water:before{content:"\F1AB"}.mdi-currency-btc:before{content:"\F1AC"}.mdi-currency-chf:before{content:"\F7B8"}.mdi-currency-cny:before{content:"\F7B9"}.mdi-currency-eth:before{content:"\F7BA"}.mdi-currency-eur:before{content:"\F1AD"}.mdi-currency-gbp:before{content:"\F1AE"}.mdi-currency-inr:before{content:"\F1AF"}.mdi-currency-jpy:before{content:"\F7BB"}.mdi-currency-krw:before{content:"\F7BC"}.mdi-currency-ngn:before{content:"\F1B0"}.mdi-currency-rub:before{content:"\F1B1"}.mdi-currency-sign:before{content:"\F7BD"}.mdi-currency-try:before{content:"\F1B2"}.mdi-currency-twd:before{content:"\F7BE"}.mdi-currency-usd:before{content:"\F1B3"}.mdi-currency-usd-off:before{content:"\F679"}.mdi-cursor-default:before{content:"\F1B4"}.mdi-cursor-default-outline:before{content:"\F1B5"}.mdi-cursor-move:before{content:"\F1B6"}.mdi-cursor-pointer:before{content:"\F1B7"}.mdi-cursor-text:before{content:"\F5E7"}.mdi-database:before{content:"\F1B8"}.mdi-database-minus:before{content:"\F1B9"}.mdi-database-plus:before{content:"\F1BA"}.mdi-debug-step-into:before{content:"\F1BB"}.mdi-debug-step-out:before{content:"\F1BC"}.mdi-debug-step-over:before{content:"\F1BD"}.mdi-decagram:before{content:"\F76B"}.mdi-decagram-outline:before{content:"\F76C"}.mdi-decimal-decrease:before{content:"\F1BE"}.mdi-decimal-increase:before{content:"\F1BF"}.mdi-delete:before{content:"\F1C0"}.mdi-delete-circle:before{content:"\F682"}.mdi-delete-empty:before{content:"\F6CB"}.mdi-delete-forever:before{content:"\F5E8"}.mdi-delete-sweep:before{content:"\F5E9"}.mdi-delete-variant:before{content:"\F1C1"}.mdi-delta:before{content:"\F1C2"}.mdi-deskphone:before{content:"\F1C3"}.mdi-desktop-classic:before{content:"\F7BF"}.mdi-desktop-mac:before{content:"\F1C4"}.mdi-desktop-tower:before{content:"\F1C5"}.mdi-details:before{content:"\F1C6"}.mdi-developer-board:before{content:"\F696"}.mdi-deviantart:before{content:"\F1C7"}.mdi-dialpad:before{content:"\F61C"}.mdi-diamond:before{content:"\F1C8"}.mdi-dice-1:before{content:"\F1CA"}.mdi-dice-2:before{content:"\F1CB"}.mdi-dice-3:before{content:"\F1CC"}.mdi-dice-4:before{content:"\F1CD"}.mdi-dice-5:before{content:"\F1CE"}.mdi-dice-6:before{content:"\F1CF"}.mdi-dice-d10:before{content:"\F76E"}.mdi-dice-d20:before{content:"\F5EA"}.mdi-dice-d4:before{content:"\F5EB"}.mdi-dice-d6:before{content:"\F5EC"}.mdi-dice-d8:before{content:"\F5ED"}.mdi-dice-multiple:before{content:"\F76D"}.mdi-dictionary:before{content:"\F61D"}.mdi-dip-switch:before{content:"\F7C0"}.mdi-directions:before{content:"\F1D0"}.mdi-directions-fork:before{content:"\F641"}.mdi-discord:before{content:"\F66F"}.mdi-disk:before{content:"\F5EE"}.mdi-disk-alert:before{content:"\F1D1"}.mdi-disqus:before{content:"\F1D2"}.mdi-disqus-outline:before{content:"\F1D3"}.mdi-division:before{content:"\F1D4"}.mdi-division-box:before{content:"\F1D5"}.mdi-dna:before{content:"\F683"}.mdi-dns:before{content:"\F1D6"}.mdi-do-not-disturb:before{content:"\F697"}.mdi-do-not-disturb-off:before{content:"\F698"}.mdi-dolby:before{content:"\F6B2"}.mdi-domain:before{content:"\F1D7"}.mdi-donkey:before{content:"\F7C1"}.mdi-dots-horizontal:before{content:"\F1D8"}.mdi-dots-horizontal-circle:before{content:"\F7C2"}.mdi-dots-vertical:before{content:"\F1D9"}.mdi-dots-vertical-circle:before{content:"\F7C3"}.mdi-douban:before{content:"\F699"}.mdi-download:before{content:"\F1DA"}.mdi-download-network:before{content:"\F6F3"}.mdi-drag:before{content:"\F1DB"}.mdi-drag-horizontal:before{content:"\F1DC"}.mdi-drag-vertical:before{content:"\F1DD"}.mdi-drawing:before{content:"\F1DE"}.mdi-drawing-box:before{content:"\F1DF"}.mdi-dribbble:before{content:"\F1E0"}.mdi-dribbble-box:before{content:"\F1E1"}.mdi-drone:before{content:"\F1E2"}.mdi-dropbox:before{content:"\F1E3"}.mdi-drupal:before{content:"\F1E4"}.mdi-duck:before{content:"\F1E5"}.mdi-dumbbell:before{content:"\F1E6"}.mdi-ear-hearing:before{content:"\F7C4"}.mdi-earth:before{content:"\F1E7"}.mdi-earth-box:before{content:"\F6CC"}.mdi-earth-box-off:before{content:"\F6CD"}.mdi-earth-off:before{content:"\F1E8"}.mdi-edge:before{content:"\F1E9"}.mdi-eject:before{content:"\F1EA"}.mdi-elephant:before{content:"\F7C5"}.mdi-elevation-decline:before{content:"\F1EB"}.mdi-elevation-rise:before{content:"\F1EC"}.mdi-elevator:before{content:"\F1ED"}.mdi-email:before{content:"\F1EE"}.mdi-email-alert:before{content:"\F6CE"}.mdi-email-open:before{content:"\F1EF"}.mdi-email-open-outline:before{content:"\F5EF"}.mdi-email-outline:before{content:"\F1F0"}.mdi-email-secure:before{content:"\F1F1"}.mdi-email-variant:before{content:"\F5F0"}.mdi-emby:before{content:"\F6B3"}.mdi-emoticon:before{content:"\F1F2"}.mdi-emoticon-cool:before{content:"\F1F3"}.mdi-emoticon-dead:before{content:"\F69A"}.mdi-emoticon-devil:before{content:"\F1F4"}.mdi-emoticon-excited:before{content:"\F69B"}.mdi-emoticon-happy:before{content:"\F1F5"}.mdi-emoticon-neutral:before{content:"\F1F6"}.mdi-emoticon-poop:before{content:"\F1F7"}.mdi-emoticon-sad:before{content:"\F1F8"}.mdi-emoticon-tongue:before{content:"\F1F9"}.mdi-engine:before{content:"\F1FA"}.mdi-engine-outline:before{content:"\F1FB"}.mdi-equal:before{content:"\F1FC"}.mdi-equal-box:before{content:"\F1FD"}.mdi-eraser:before{content:"\F1FE"}.mdi-eraser-variant:before{content:"\F642"}.mdi-escalator:before{content:"\F1FF"}.mdi-ethernet:before{content:"\F200"}.mdi-ethernet-cable:before{content:"\F201"}.mdi-ethernet-cable-off:before{content:"\F202"}.mdi-etsy:before{content:"\F203"}.mdi-ev-station:before{content:"\F5F1"}.mdi-eventbrite:before{content:"\F7C6"}.mdi-evernote:before{content:"\F204"}.mdi-exclamation:before{content:"\F205"}.mdi-exit-to-app:before{content:"\F206"}.mdi-export:before{content:"\F207"}.mdi-eye:before{content:"\F208"}.mdi-eye-off:before{content:"\F209"}.mdi-eye-off-outline:before{content:"\F6D0"}.mdi-eye-outline:before{content:"\F6CF"}.mdi-eyedropper:before{content:"\F20A"}.mdi-eyedropper-variant:before{content:"\F20B"}.mdi-face:before{content:"\F643"}.mdi-face-profile:before{content:"\F644"}.mdi-facebook:before{content:"\F20C"}.mdi-facebook-box:before{content:"\F20D"}.mdi-facebook-messenger:before{content:"\F20E"}.mdi-factory:before{content:"\F20F"}.mdi-fan:before{content:"\F210"}.mdi-fast-forward:before{content:"\F211"}.mdi-fast-forward-outline:before{content:"\F6D1"}.mdi-fax:before{content:"\F212"}.mdi-feather:before{content:"\F6D2"}.mdi-ferry:before{content:"\F213"}.mdi-file:before{content:"\F214"}.mdi-file-account:before{content:"\F73A"}.mdi-file-chart:before{content:"\F215"}.mdi-file-check:before{content:"\F216"}.mdi-file-cloud:before{content:"\F217"}.mdi-file-delimited:before{content:"\F218"}.mdi-file-document:before{content:"\F219"}.mdi-file-document-box:before{content:"\F21A"}.mdi-file-excel:before{content:"\F21B"}.mdi-file-excel-box:before{content:"\F21C"}.mdi-file-export:before{content:"\F21D"}.mdi-file-find:before{content:"\F21E"}.mdi-file-hidden:before{content:"\F613"}.mdi-file-image:before{content:"\F21F"}.mdi-file-import:before{content:"\F220"}.mdi-file-lock:before{content:"\F221"}.mdi-file-multiple:before{content:"\F222"}.mdi-file-music:before{content:"\F223"}.mdi-file-outline:before{content:"\F224"}.mdi-file-pdf:before{content:"\F225"}.mdi-file-pdf-box:before{content:"\F226"}.mdi-file-plus:before{content:"\F751"}.mdi-file-powerpoint:before{content:"\F227"}.mdi-file-powerpoint-box:before{content:"\F228"}.mdi-file-presentation-box:before{content:"\F229"}.mdi-file-restore:before{content:"\F670"}.mdi-file-send:before{content:"\F22A"}.mdi-file-tree:before{content:"\F645"}.mdi-file-video:before{content:"\F22B"}.mdi-file-word:before{content:"\F22C"}.mdi-file-word-box:before{content:"\F22D"}.mdi-file-xml:before{content:"\F22E"}.mdi-film:before{content:"\F22F"}.mdi-filmstrip:before{content:"\F230"}.mdi-filmstrip-off:before{content:"\F231"}.mdi-filter:before{content:"\F232"}.mdi-filter-outline:before{content:"\F233"}.mdi-filter-remove:before{content:"\F234"}.mdi-filter-remove-outline:before{content:"\F235"}.mdi-filter-variant:before{content:"\F236"}.mdi-find-replace:before{content:"\F6D3"}.mdi-fingerprint:before{content:"\F237"}.mdi-fire:before{content:"\F238"}.mdi-firefox:before{content:"\F239"}.mdi-fish:before{content:"\F23A"}.mdi-flag:before{content:"\F23B"}.mdi-flag-checkered:before{content:"\F23C"}.mdi-flag-outline:before{content:"\F23D"}.mdi-flag-outline-variant:before{content:"\F23E"}.mdi-flag-triangle:before{content:"\F23F"}.mdi-flag-variant:before{content:"\F240"}.mdi-flash:before{content:"\F241"}.mdi-flash-auto:before{content:"\F242"}.mdi-flash-off:before{content:"\F243"}.mdi-flash-outline:before{content:"\F6D4"}.mdi-flash-red-eye:before{content:"\F67A"}.mdi-flashlight:before{content:"\F244"}.mdi-flashlight-off:before{content:"\F245"}.mdi-flask:before{content:"\F093"}.mdi-flask-empty:before{content:"\F094"}.mdi-flask-empty-outline:before{content:"\F095"}.mdi-flask-outline:before{content:"\F096"}.mdi-flattr:before{content:"\F246"}.mdi-flip-to-back:before{content:"\F247"}.mdi-flip-to-front:before{content:"\F248"}.mdi-floppy:before{content:"\F249"}.mdi-flower:before{content:"\F24A"}.mdi-folder:before{content:"\F24B"}.mdi-folder-account:before{content:"\F24C"}.mdi-folder-download:before{content:"\F24D"}.mdi-folder-google-drive:before{content:"\F24E"}.mdi-folder-image:before{content:"\F24F"}.mdi-folder-lock:before{content:"\F250"}.mdi-folder-lock-open:before{content:"\F251"}.mdi-folder-move:before{content:"\F252"}.mdi-folder-multiple:before{content:"\F253"}.mdi-folder-multiple-image:before{content:"\F254"}.mdi-folder-multiple-outline:before{content:"\F255"}.mdi-folder-open:before{content:"\F76F"}.mdi-folder-outline:before{content:"\F256"}.mdi-folder-plus:before{content:"\F257"}.mdi-folder-remove:before{content:"\F258"}.mdi-folder-star:before{content:"\F69C"}.mdi-folder-upload:before{content:"\F259"}.mdi-font-awesome:before{content:"\F03A"}.mdi-food:before{content:"\F25A"}.mdi-food-apple:before{content:"\F25B"}.mdi-food-croissant:before{content:"\F7C7"}.mdi-food-fork-drink:before{content:"\F5F2"}.mdi-food-off:before{content:"\F5F3"}.mdi-food-variant:before{content:"\F25C"}.mdi-football:before{content:"\F25D"}.mdi-football-australian:before{content:"\F25E"}.mdi-football-helmet:before{content:"\F25F"}.mdi-forklift:before{content:"\F7C8"}.mdi-format-align-bottom:before{content:"\F752"}.mdi-format-align-center:before{content:"\F260"}.mdi-format-align-justify:before{content:"\F261"}.mdi-format-align-left:before{content:"\F262"}.mdi-format-align-middle:before{content:"\F753"}.mdi-format-align-right:before{content:"\F263"}.mdi-format-align-top:before{content:"\F754"}.mdi-format-annotation-plus:before{content:"\F646"}.mdi-format-bold:before{content:"\F264"}.mdi-format-clear:before{content:"\F265"}.mdi-format-color-fill:before{content:"\F266"}.mdi-format-color-text:before{content:"\F69D"}.mdi-format-float-center:before{content:"\F267"}.mdi-format-float-left:before{content:"\F268"}.mdi-format-float-none:before{content:"\F269"}.mdi-format-float-right:before{content:"\F26A"}.mdi-format-font:before{content:"\F6D5"}.mdi-format-header-1:before{content:"\F26B"}.mdi-format-header-2:before{content:"\F26C"}.mdi-format-header-3:before{content:"\F26D"}.mdi-format-header-4:before{content:"\F26E"}.mdi-format-header-5:before{content:"\F26F"}.mdi-format-header-6:before{content:"\F270"}.mdi-format-header-decrease:before{content:"\F271"}.mdi-format-header-equal:before{content:"\F272"}.mdi-format-header-increase:before{content:"\F273"}.mdi-format-header-pound:before{content:"\F274"}.mdi-format-horizontal-align-center:before{content:"\F61E"}.mdi-format-horizontal-align-left:before{content:"\F61F"}.mdi-format-horizontal-align-right:before{content:"\F620"}.mdi-format-indent-decrease:before{content:"\F275"}.mdi-format-indent-increase:before{content:"\F276"}.mdi-format-italic:before{content:"\F277"}.mdi-format-line-spacing:before{content:"\F278"}.mdi-format-line-style:before{content:"\F5C8"}.mdi-format-line-weight:before{content:"\F5C9"}.mdi-format-list-bulleted:before{content:"\F279"}.mdi-format-list-bulleted-type:before{content:"\F27A"}.mdi-format-list-checks:before{content:"\F755"}.mdi-format-list-numbers:before{content:"\F27B"}.mdi-format-page-break:before{content:"\F6D6"}.mdi-format-paint:before{content:"\F27C"}.mdi-format-paragraph:before{content:"\F27D"}.mdi-format-pilcrow:before{content:"\F6D7"}.mdi-format-quote-close:before{content:"\F27E"}.mdi-format-quote-open:before{content:"\F756"}.mdi-format-rotate-90:before{content:"\F6A9"}.mdi-format-section:before{content:"\F69E"}.mdi-format-size:before{content:"\F27F"}.mdi-format-strikethrough:before{content:"\F280"}.mdi-format-strikethrough-variant:before{content:"\F281"}.mdi-format-subscript:before{content:"\F282"}.mdi-format-superscript:before{content:"\F283"}.mdi-format-text:before{content:"\F284"}.mdi-format-textdirection-l-to-r:before{content:"\F285"}.mdi-format-textdirection-r-to-l:before{content:"\F286"}.mdi-format-title:before{content:"\F5F4"}.mdi-format-underline:before{content:"\F287"}.mdi-format-vertical-align-bottom:before{content:"\F621"}.mdi-format-vertical-align-center:before{content:"\F622"}.mdi-format-vertical-align-top:before{content:"\F623"}.mdi-format-wrap-inline:before{content:"\F288"}.mdi-format-wrap-square:before{content:"\F289"}.mdi-format-wrap-tight:before{content:"\F28A"}.mdi-format-wrap-top-bottom:before{content:"\F28B"}.mdi-forum:before{content:"\F28C"}.mdi-forward:before{content:"\F28D"}.mdi-foursquare:before{content:"\F28E"}.mdi-fridge:before{content:"\F28F"}.mdi-fridge-filled:before{content:"\F290"}.mdi-fridge-filled-bottom:before{content:"\F291"}.mdi-fridge-filled-top:before{content:"\F292"}.mdi-fuel:before{content:"\F7C9"}.mdi-fullscreen:before{content:"\F293"}.mdi-fullscreen-exit:before{content:"\F294"}.mdi-function:before{content:"\F295"}.mdi-gamepad:before{content:"\F296"}.mdi-gamepad-variant:before{content:"\F297"}.mdi-garage:before{content:"\F6D8"}.mdi-garage-open:before{content:"\F6D9"}.mdi-gas-cylinder:before{content:"\F647"}.mdi-gas-station:before{content:"\F298"}.mdi-gate:before{content:"\F299"}.mdi-gauge:before{content:"\F29A"}.mdi-gavel:before{content:"\F29B"}.mdi-gender-female:before{content:"\F29C"}.mdi-gender-male:before{content:"\F29D"}.mdi-gender-male-female:before{content:"\F29E"}.mdi-gender-transgender:before{content:"\F29F"}.mdi-gesture:before{content:"\F7CA"}.mdi-gesture-double-tap:before{content:"\F73B"}.mdi-gesture-swipe-down:before{content:"\F73C"}.mdi-gesture-swipe-left:before{content:"\F73D"}.mdi-gesture-swipe-right:before{content:"\F73E"}.mdi-gesture-swipe-up:before{content:"\F73F"}.mdi-gesture-tap:before{content:"\F740"}.mdi-gesture-two-double-tap:before{content:"\F741"}.mdi-gesture-two-tap:before{content:"\F742"}.mdi-ghost:before{content:"\F2A0"}.mdi-gift:before{content:"\F2A1"}.mdi-git:before{content:"\F2A2"}.mdi-github-box:before{content:"\F2A3"}.mdi-github-circle:before{content:"\F2A4"}.mdi-github-face:before{content:"\F6DA"}.mdi-glass-flute:before{content:"\F2A5"}.mdi-glass-mug:before{content:"\F2A6"}.mdi-glass-stange:before{content:"\F2A7"}.mdi-glass-tulip:before{content:"\F2A8"}.mdi-glassdoor:before{content:"\F2A9"}.mdi-glasses:before{content:"\F2AA"}.mdi-gmail:before{content:"\F2AB"}.mdi-gnome:before{content:"\F2AC"}.mdi-gondola:before{content:"\F685"}.mdi-google:before{content:"\F2AD"}.mdi-google-analytics:before{content:"\F7CB"}.mdi-google-assistant:before{content:"\F7CC"}.mdi-google-cardboard:before{content:"\F2AE"}.mdi-google-chrome:before{content:"\F2AF"}.mdi-google-circles:before{content:"\F2B0"}.mdi-google-circles-communities:before{content:"\F2B1"}.mdi-google-circles-extended:before{content:"\F2B2"}.mdi-google-circles-group:before{content:"\F2B3"}.mdi-google-controller:before{content:"\F2B4"}.mdi-google-controller-off:before{content:"\F2B5"}.mdi-google-drive:before{content:"\F2B6"}.mdi-google-earth:before{content:"\F2B7"}.mdi-google-glass:before{content:"\F2B8"}.mdi-google-keep:before{content:"\F6DB"}.mdi-google-maps:before{content:"\F5F5"}.mdi-google-nearby:before{content:"\F2B9"}.mdi-google-pages:before{content:"\F2BA"}.mdi-google-photos:before{content:"\F6DC"}.mdi-google-physical-web:before{content:"\F2BB"}.mdi-google-play:before{content:"\F2BC"}.mdi-google-plus:before{content:"\F2BD"}.mdi-google-plus-box:before{content:"\F2BE"}.mdi-google-translate:before{content:"\F2BF"}.mdi-google-wallet:before{content:"\F2C0"}.mdi-gradient:before{content:"\F69F"}.mdi-grease-pencil:before{content:"\F648"}.mdi-grid:before{content:"\F2C1"}.mdi-grid-large:before{content:"\F757"}.mdi-grid-off:before{content:"\F2C2"}.mdi-group:before{content:"\F2C3"}.mdi-guitar-acoustic:before{content:"\F770"}.mdi-guitar-electric:before{content:"\F2C4"}.mdi-guitar-pick:before{content:"\F2C5"}.mdi-guitar-pick-outline:before{content:"\F2C6"}.mdi-hackernews:before{content:"\F624"}.mdi-hamburger:before{content:"\F684"}.mdi-hand-pointing-right:before{content:"\F2C7"}.mdi-hanger:before{content:"\F2C8"}.mdi-hangouts:before{content:"\F2C9"}.mdi-harddisk:before{content:"\F2CA"}.mdi-headphones:before{content:"\F2CB"}.mdi-headphones-box:before{content:"\F2CC"}.mdi-headphones-off:before{content:"\F7CD"}.mdi-headphones-settings:before{content:"\F2CD"}.mdi-headset:before{content:"\F2CE"}.mdi-headset-dock:before{content:"\F2CF"}.mdi-headset-off:before{content:"\F2D0"}.mdi-heart:before{content:"\F2D1"}.mdi-heart-box:before{content:"\F2D2"}.mdi-heart-box-outline:before{content:"\F2D3"}.mdi-heart-broken:before{content:"\F2D4"}.mdi-heart-half:before{content:"\F6DE"}.mdi-heart-half-full:before{content:"\F6DD"}.mdi-heart-half-outline:before{content:"\F6DF"}.mdi-heart-off:before{content:"\F758"}.mdi-heart-outline:before{content:"\F2D5"}.mdi-heart-pulse:before{content:"\F5F6"}.mdi-help:before{content:"\F2D6"}.mdi-help-box:before{content:"\F78A"}.mdi-help-circle:before{content:"\F2D7"}.mdi-help-circle-outline:before{content:"\F625"}.mdi-help-network:before{content:"\F6F4"}.mdi-hexagon:before{content:"\F2D8"}.mdi-hexagon-multiple:before{content:"\F6E0"}.mdi-hexagon-outline:before{content:"\F2D9"}.mdi-high-definition:before{content:"\F7CE"}.mdi-highway:before{content:"\F5F7"}.mdi-history:before{content:"\F2DA"}.mdi-hololens:before{content:"\F2DB"}.mdi-home:before{content:"\F2DC"}.mdi-home-assistant:before{content:"\F7CF"}.mdi-home-automation:before{content:"\F7D0"}.mdi-home-circle:before{content:"\F7D1"}.mdi-home-map-marker:before{content:"\F5F8"}.mdi-home-modern:before{content:"\F2DD"}.mdi-home-outline:before{content:"\F6A0"}.mdi-home-variant:before{content:"\F2DE"}.mdi-hook:before{content:"\F6E1"}.mdi-hook-off:before{content:"\F6E2"}.mdi-hops:before{content:"\F2DF"}.mdi-hospital:before{content:"\F2E0"}.mdi-hospital-building:before{content:"\F2E1"}.mdi-hospital-marker:before{content:"\F2E2"}.mdi-hotel:before{content:"\F2E3"}.mdi-houzz:before{content:"\F2E4"}.mdi-houzz-box:before{content:"\F2E5"}.mdi-human:before{content:"\F2E6"}.mdi-human-child:before{content:"\F2E7"}.mdi-human-female:before{content:"\F649"}.mdi-human-greeting:before{content:"\F64A"}.mdi-human-handsdown:before{content:"\F64B"}.mdi-human-handsup:before{content:"\F64C"}.mdi-human-male:before{content:"\F64D"}.mdi-human-male-female:before{content:"\F2E8"}.mdi-human-pregnant:before{content:"\F5CF"}.mdi-humble-bundle:before{content:"\F743"}.mdi-image:before{content:"\F2E9"}.mdi-image-album:before{content:"\F2EA"}.mdi-image-area:before{content:"\F2EB"}.mdi-image-area-close:before{content:"\F2EC"}.mdi-image-broken:before{content:"\F2ED"}.mdi-image-broken-variant:before{content:"\F2EE"}.mdi-image-filter:before{content:"\F2EF"}.mdi-image-filter-black-white:before{content:"\F2F0"}.mdi-image-filter-center-focus:before{content:"\F2F1"}.mdi-image-filter-center-focus-weak:before{content:"\F2F2"}.mdi-image-filter-drama:before{content:"\F2F3"}.mdi-image-filter-frames:before{content:"\F2F4"}.mdi-image-filter-hdr:before{content:"\F2F5"}.mdi-image-filter-none:before{content:"\F2F6"}.mdi-image-filter-tilt-shift:before{content:"\F2F7"}.mdi-image-filter-vintage:before{content:"\F2F8"}.mdi-image-multiple:before{content:"\F2F9"}.mdi-import:before{content:"\F2FA"}.mdi-inbox:before{content:"\F686"}.mdi-inbox-arrow-down:before{content:"\F2FB"}.mdi-inbox-arrow-up:before{content:"\F3D1"}.mdi-incognito:before{content:"\F5F9"}.mdi-infinity:before{content:"\F6E3"}.mdi-information:before{content:"\F2FC"}.mdi-information-outline:before{content:"\F2FD"}.mdi-information-variant:before{content:"\F64E"}.mdi-instagram:before{content:"\F2FE"}.mdi-instapaper:before{content:"\F2FF"}.mdi-internet-explorer:before{content:"\F300"}.mdi-invert-colors:before{content:"\F301"}.mdi-itunes:before{content:"\F676"}.mdi-jeepney:before{content:"\F302"}.mdi-jira:before{content:"\F303"}.mdi-jsfiddle:before{content:"\F304"}.mdi-json:before{content:"\F626"}.mdi-keg:before{content:"\F305"}.mdi-kettle:before{content:"\F5FA"}.mdi-key:before{content:"\F306"}.mdi-key-change:before{content:"\F307"}.mdi-key-minus:before{content:"\F308"}.mdi-key-plus:before{content:"\F309"}.mdi-key-remove:before{content:"\F30A"}.mdi-key-variant:before{content:"\F30B"}.mdi-keyboard:before{content:"\F30C"}.mdi-keyboard-backspace:before{content:"\F30D"}.mdi-keyboard-caps:before{content:"\F30E"}.mdi-keyboard-close:before{content:"\F30F"}.mdi-keyboard-off:before{content:"\F310"}.mdi-keyboard-return:before{content:"\F311"}.mdi-keyboard-tab:before{content:"\F312"}.mdi-keyboard-variant:before{content:"\F313"}.mdi-kickstarter:before{content:"\F744"}.mdi-kodi:before{content:"\F314"}.mdi-label:before{content:"\F315"}.mdi-label-outline:before{content:"\F316"}.mdi-lambda:before{content:"\F627"}.mdi-lamp:before{content:"\F6B4"}.mdi-lan:before{content:"\F317"}.mdi-lan-connect:before{content:"\F318"}.mdi-lan-disconnect:before{content:"\F319"}.mdi-lan-pending:before{content:"\F31A"}.mdi-language-c:before{content:"\F671"}.mdi-language-cpp:before{content:"\F672"}.mdi-language-csharp:before{content:"\F31B"}.mdi-language-css3:before{content:"\F31C"}.mdi-language-go:before{content:"\F7D2"}.mdi-language-html5:before{content:"\F31D"}.mdi-language-javascript:before{content:"\F31E"}.mdi-language-php:before{content:"\F31F"}.mdi-language-python:before{content:"\F320"}.mdi-language-python-text:before{content:"\F321"}.mdi-language-r:before{content:"\F7D3"}.mdi-language-swift:before{content:"\F6E4"}.mdi-language-typescript:before{content:"\F6E5"}.mdi-laptop:before{content:"\F322"}.mdi-laptop-chromebook:before{content:"\F323"}.mdi-laptop-mac:before{content:"\F324"}.mdi-laptop-off:before{content:"\F6E6"}.mdi-laptop-windows:before{content:"\F325"}.mdi-lastfm:before{content:"\F326"}.mdi-launch:before{content:"\F327"}.mdi-lava-lamp:before{content:"\F7D4"}.mdi-layers:before{content:"\F328"}.mdi-layers-off:before{content:"\F329"}.mdi-lead-pencil:before{content:"\F64F"}.mdi-leaf:before{content:"\F32A"}.mdi-led-off:before{content:"\F32B"}.mdi-led-on:before{content:"\F32C"}.mdi-led-outline:before{content:"\F32D"}.mdi-led-strip:before{content:"\F7D5"}.mdi-led-variant-off:before{content:"\F32E"}.mdi-led-variant-on:before{content:"\F32F"}.mdi-led-variant-outline:before{content:"\F330"}.mdi-library:before{content:"\F331"}.mdi-library-books:before{content:"\F332"}.mdi-library-music:before{content:"\F333"}.mdi-library-plus:before{content:"\F334"}.mdi-lightbulb:before{content:"\F335"}.mdi-lightbulb-on:before{content:"\F6E7"}.mdi-lightbulb-on-outline:before{content:"\F6E8"}.mdi-lightbulb-outline:before{content:"\F336"}.mdi-link:before{content:"\F337"}.mdi-link-off:before{content:"\F338"}.mdi-link-variant:before{content:"\F339"}.mdi-link-variant-off:before{content:"\F33A"}.mdi-linkedin:before{content:"\F33B"}.mdi-linkedin-box:before{content:"\F33C"}.mdi-linux:before{content:"\F33D"}.mdi-loading:before{content:"\F771"}.mdi-lock:before{content:"\F33E"}.mdi-lock-open:before{content:"\F33F"}.mdi-lock-open-outline:before{content:"\F340"}.mdi-lock-outline:before{content:"\F341"}.mdi-lock-pattern:before{content:"\F6E9"}.mdi-lock-plus:before{content:"\F5FB"}.mdi-lock-reset:before{content:"\F772"}.mdi-locker:before{content:"\F7D6"}.mdi-locker-multiple:before{content:"\F7D7"}.mdi-login:before{content:"\F342"}.mdi-login-variant:before{content:"\F5FC"}.mdi-logout:before{content:"\F343"}.mdi-logout-variant:before{content:"\F5FD"}.mdi-looks:before{content:"\F344"}.mdi-loop:before{content:"\F6EA"}.mdi-loupe:before{content:"\F345"}.mdi-lumx:before{content:"\F346"}.mdi-magnet:before{content:"\F347"}.mdi-magnet-on:before{content:"\F348"}.mdi-magnify:before{content:"\F349"}.mdi-magnify-minus:before{content:"\F34A"}.mdi-magnify-minus-outline:before{content:"\F6EB"}.mdi-magnify-plus:before{content:"\F34B"}.mdi-magnify-plus-outline:before{content:"\F6EC"}.mdi-mail-ru:before{content:"\F34C"}.mdi-mailbox:before{content:"\F6ED"}.mdi-map:before{content:"\F34D"}.mdi-map-marker:before{content:"\F34E"}.mdi-map-marker-circle:before{content:"\F34F"}.mdi-map-marker-minus:before{content:"\F650"}.mdi-map-marker-multiple:before{content:"\F350"}.mdi-map-marker-off:before{content:"\F351"}.mdi-map-marker-outline:before{content:"\F7D8"}.mdi-map-marker-plus:before{content:"\F651"}.mdi-map-marker-radius:before{content:"\F352"}.mdi-margin:before{content:"\F353"}.mdi-markdown:before{content:"\F354"}.mdi-marker:before{content:"\F652"}.mdi-marker-check:before{content:"\F355"}.mdi-martini:before{content:"\F356"}.mdi-material-ui:before{content:"\F357"}.mdi-math-compass:before{content:"\F358"}.mdi-matrix:before{content:"\F628"}.mdi-maxcdn:before{content:"\F359"}.mdi-medical-bag:before{content:"\F6EE"}.mdi-medium:before{content:"\F35A"}.mdi-memory:before{content:"\F35B"}.mdi-menu:before{content:"\F35C"}.mdi-menu-down:before{content:"\F35D"}.mdi-menu-down-outline:before{content:"\F6B5"}.mdi-menu-left:before{content:"\F35E"}.mdi-menu-right:before{content:"\F35F"}.mdi-menu-up:before{content:"\F360"}.mdi-menu-up-outline:before{content:"\F6B6"}.mdi-message:before{content:"\F361"}.mdi-message-alert:before{content:"\F362"}.mdi-message-bulleted:before{content:"\F6A1"}.mdi-message-bulleted-off:before{content:"\F6A2"}.mdi-message-draw:before{content:"\F363"}.mdi-message-image:before{content:"\F364"}.mdi-message-outline:before{content:"\F365"}.mdi-message-plus:before{content:"\F653"}.mdi-message-processing:before{content:"\F366"}.mdi-message-reply:before{content:"\F367"}.mdi-message-reply-text:before{content:"\F368"}.mdi-message-settings:before{content:"\F6EF"}.mdi-message-settings-variant:before{content:"\F6F0"}.mdi-message-text:before{content:"\F369"}.mdi-message-text-outline:before{content:"\F36A"}.mdi-message-video:before{content:"\F36B"}.mdi-meteor:before{content:"\F629"}.mdi-metronome:before{content:"\F7D9"}.mdi-metronome-tick:before{content:"\F7DA"}.mdi-micro-sd:before{content:"\F7DB"}.mdi-microphone:before{content:"\F36C"}.mdi-microphone-off:before{content:"\F36D"}.mdi-microphone-outline:before{content:"\F36E"}.mdi-microphone-settings:before{content:"\F36F"}.mdi-microphone-variant:before{content:"\F370"}.mdi-microphone-variant-off:before{content:"\F371"}.mdi-microscope:before{content:"\F654"}.mdi-microsoft:before{content:"\F372"}.mdi-minecraft:before{content:"\F373"}.mdi-minus:before{content:"\F374"}.mdi-minus-box:before{content:"\F375"}.mdi-minus-box-outline:before{content:"\F6F1"}.mdi-minus-circle:before{content:"\F376"}.mdi-minus-circle-outline:before{content:"\F377"}.mdi-minus-network:before{content:"\F378"}.mdi-mixcloud:before{content:"\F62A"}.mdi-mixer:before{content:"\F7DC"}.mdi-monitor:before{content:"\F379"}.mdi-monitor-multiple:before{content:"\F37A"}.mdi-more:before{content:"\F37B"}.mdi-motorbike:before{content:"\F37C"}.mdi-mouse:before{content:"\F37D"}.mdi-mouse-off:before{content:"\F37E"}.mdi-mouse-variant:before{content:"\F37F"}.mdi-mouse-variant-off:before{content:"\F380"}.mdi-move-resize:before{content:"\F655"}.mdi-move-resize-variant:before{content:"\F656"}.mdi-movie:before{content:"\F381"}.mdi-movie-roll:before{content:"\F7DD"}.mdi-multiplication:before{content:"\F382"}.mdi-multiplication-box:before{content:"\F383"}.mdi-mushroom:before{content:"\F7DE"}.mdi-mushroom-outline:before{content:"\F7DF"}.mdi-music:before{content:"\F759"}.mdi-music-box:before{content:"\F384"}.mdi-music-box-outline:before{content:"\F385"}.mdi-music-circle:before{content:"\F386"}.mdi-music-note:before{content:"\F387"}.mdi-music-note-bluetooth:before{content:"\F5FE"}.mdi-music-note-bluetooth-off:before{content:"\F5FF"}.mdi-music-note-eighth:before{content:"\F388"}.mdi-music-note-half:before{content:"\F389"}.mdi-music-note-off:before{content:"\F38A"}.mdi-music-note-quarter:before{content:"\F38B"}.mdi-music-note-sixteenth:before{content:"\F38C"}.mdi-music-note-whole:before{content:"\F38D"}.mdi-music-off:before{content:"\F75A"}.mdi-nature:before{content:"\F38E"}.mdi-nature-people:before{content:"\F38F"}.mdi-navigation:before{content:"\F390"}.mdi-near-me:before{content:"\F5CD"}.mdi-needle:before{content:"\F391"}.mdi-nest-protect:before{content:"\F392"}.mdi-nest-thermostat:before{content:"\F393"}.mdi-netflix:before{content:"\F745"}.mdi-network:before{content:"\F6F2"}.mdi-new-box:before{content:"\F394"}.mdi-newspaper:before{content:"\F395"}.mdi-nfc:before{content:"\F396"}.mdi-nfc-tap:before{content:"\F397"}.mdi-nfc-variant:before{content:"\F398"}.mdi-ninja:before{content:"\F773"}.mdi-nintendo-switch:before{content:"\F7E0"}.mdi-nodejs:before{content:"\F399"}.mdi-note:before{content:"\F39A"}.mdi-note-multiple:before{content:"\F6B7"}.mdi-note-multiple-outline:before{content:"\F6B8"}.mdi-note-outline:before{content:"\F39B"}.mdi-note-plus:before{content:"\F39C"}.mdi-note-plus-outline:before{content:"\F39D"}.mdi-note-text:before{content:"\F39E"}.mdi-notification-clear-all:before{content:"\F39F"}.mdi-npm:before{content:"\F6F6"}.mdi-nuke:before{content:"\F6A3"}.mdi-null:before{content:"\F7E1"}.mdi-numeric:before{content:"\F3A0"}.mdi-numeric-0-box:before{content:"\F3A1"}.mdi-numeric-0-box-multiple-outline:before{content:"\F3A2"}.mdi-numeric-0-box-outline:before{content:"\F3A3"}.mdi-numeric-1-box:before{content:"\F3A4"}.mdi-numeric-1-box-multiple-outline:before{content:"\F3A5"}.mdi-numeric-1-box-outline:before{content:"\F3A6"}.mdi-numeric-2-box:before{content:"\F3A7"}.mdi-numeric-2-box-multiple-outline:before{content:"\F3A8"}.mdi-numeric-2-box-outline:before{content:"\F3A9"}.mdi-numeric-3-box:before{content:"\F3AA"}.mdi-numeric-3-box-multiple-outline:before{content:"\F3AB"}.mdi-numeric-3-box-outline:before{content:"\F3AC"}.mdi-numeric-4-box:before{content:"\F3AD"}.mdi-numeric-4-box-multiple-outline:before{content:"\F3AE"}.mdi-numeric-4-box-outline:before{content:"\F3AF"}.mdi-numeric-5-box:before{content:"\F3B0"}.mdi-numeric-5-box-multiple-outline:before{content:"\F3B1"}.mdi-numeric-5-box-outline:before{content:"\F3B2"}.mdi-numeric-6-box:before{content:"\F3B3"}.mdi-numeric-6-box-multiple-outline:before{content:"\F3B4"}.mdi-numeric-6-box-outline:before{content:"\F3B5"}.mdi-numeric-7-box:before{content:"\F3B6"}.mdi-numeric-7-box-multiple-outline:before{content:"\F3B7"}.mdi-numeric-7-box-outline:before{content:"\F3B8"}.mdi-numeric-8-box:before{content:"\F3B9"}.mdi-numeric-8-box-multiple-outline:before{content:"\F3BA"}.mdi-numeric-8-box-outline:before{content:"\F3BB"}.mdi-numeric-9-box:before{content:"\F3BC"}.mdi-numeric-9-box-multiple-outline:before{content:"\F3BD"}.mdi-numeric-9-box-outline:before{content:"\F3BE"}.mdi-numeric-9-plus-box:before{content:"\F3BF"}.mdi-numeric-9-plus-box-multiple-outline:before{content:"\F3C0"}.mdi-numeric-9-plus-box-outline:before{content:"\F3C1"}.mdi-nut:before{content:"\F6F7"}.mdi-nutrition:before{content:"\F3C2"}.mdi-oar:before{content:"\F67B"}.mdi-octagon:before{content:"\F3C3"}.mdi-octagon-outline:before{content:"\F3C4"}.mdi-octagram:before{content:"\F6F8"}.mdi-octagram-outline:before{content:"\F774"}.mdi-odnoklassniki:before{content:"\F3C5"}.mdi-office:before{content:"\F3C6"}.mdi-oil:before{content:"\F3C7"}.mdi-oil-temperature:before{content:"\F3C8"}.mdi-omega:before{content:"\F3C9"}.mdi-onedrive:before{content:"\F3CA"}.mdi-onenote:before{content:"\F746"}.mdi-opacity:before{content:"\F5CC"}.mdi-open-in-app:before{content:"\F3CB"}.mdi-open-in-new:before{content:"\F3CC"}.mdi-openid:before{content:"\F3CD"}.mdi-opera:before{content:"\F3CE"}.mdi-orbit:before{content:"\F018"}.mdi-ornament:before{content:"\F3CF"}.mdi-ornament-variant:before{content:"\F3D0"}.mdi-owl:before{content:"\F3D2"}.mdi-package:before{content:"\F3D3"}.mdi-package-down:before{content:"\F3D4"}.mdi-package-up:before{content:"\F3D5"}.mdi-package-variant:before{content:"\F3D6"}.mdi-package-variant-closed:before{content:"\F3D7"}.mdi-page-first:before{content:"\F600"}.mdi-page-last:before{content:"\F601"}.mdi-page-layout-body:before{content:"\F6F9"}.mdi-page-layout-footer:before{content:"\F6FA"}.mdi-page-layout-header:before{content:"\F6FB"}.mdi-page-layout-sidebar-left:before{content:"\F6FC"}.mdi-page-layout-sidebar-right:before{content:"\F6FD"}.mdi-palette:before{content:"\F3D8"}.mdi-palette-advanced:before{content:"\F3D9"}.mdi-panda:before{content:"\F3DA"}.mdi-pandora:before{content:"\F3DB"}.mdi-panorama:before{content:"\F3DC"}.mdi-panorama-fisheye:before{content:"\F3DD"}.mdi-panorama-horizontal:before{content:"\F3DE"}.mdi-panorama-vertical:before{content:"\F3DF"}.mdi-panorama-wide-angle:before{content:"\F3E0"}.mdi-paper-cut-vertical:before{content:"\F3E1"}.mdi-paperclip:before{content:"\F3E2"}.mdi-parking:before{content:"\F3E3"}.mdi-passport:before{content:"\F7E2"}.mdi-pause:before{content:"\F3E4"}.mdi-pause-circle:before{content:"\F3E5"}.mdi-pause-circle-outline:before{content:"\F3E6"}.mdi-pause-octagon:before{content:"\F3E7"}.mdi-pause-octagon-outline:before{content:"\F3E8"}.mdi-paw:before{content:"\F3E9"}.mdi-paw-off:before{content:"\F657"}.mdi-pen:before{content:"\F3EA"}.mdi-pencil:before{content:"\F3EB"}.mdi-pencil-box:before{content:"\F3EC"}.mdi-pencil-box-outline:before{content:"\F3ED"}.mdi-pencil-circle:before{content:"\F6FE"}.mdi-pencil-circle-outline:before{content:"\F775"}.mdi-pencil-lock:before{content:"\F3EE"}.mdi-pencil-off:before{content:"\F3EF"}.mdi-pentagon:before{content:"\F6FF"}.mdi-pentagon-outline:before{content:"\F700"}.mdi-percent:before{content:"\F3F0"}.mdi-periodic-table-co2:before{content:"\F7E3"}.mdi-periscope:before{content:"\F747"}.mdi-pharmacy:before{content:"\F3F1"}.mdi-phone:before{content:"\F3F2"}.mdi-phone-bluetooth:before{content:"\F3F3"}.mdi-phone-classic:before{content:"\F602"}.mdi-phone-forward:before{content:"\F3F4"}.mdi-phone-hangup:before{content:"\F3F5"}.mdi-phone-in-talk:before{content:"\F3F6"}.mdi-phone-incoming:before{content:"\F3F7"}.mdi-phone-locked:before{content:"\F3F8"}.mdi-phone-log:before{content:"\F3F9"}.mdi-phone-minus:before{content:"\F658"}.mdi-phone-missed:before{content:"\F3FA"}.mdi-phone-outgoing:before{content:"\F3FB"}.mdi-phone-paused:before{content:"\F3FC"}.mdi-phone-plus:before{content:"\F659"}.mdi-phone-settings:before{content:"\F3FD"}.mdi-phone-voip:before{content:"\F3FE"}.mdi-pi:before{content:"\F3FF"}.mdi-pi-box:before{content:"\F400"}.mdi-piano:before{content:"\F67C"}.mdi-pig:before{content:"\F401"}.mdi-pill:before{content:"\F402"}.mdi-pillar:before{content:"\F701"}.mdi-pin:before{content:"\F403"}.mdi-pin-off:before{content:"\F404"}.mdi-pine-tree:before{content:"\F405"}.mdi-pine-tree-box:before{content:"\F406"}.mdi-pinterest:before{content:"\F407"}.mdi-pinterest-box:before{content:"\F408"}.mdi-pipe:before{content:"\F7E4"}.mdi-pipe-disconnected:before{content:"\F7E5"}.mdi-pistol:before{content:"\F702"}.mdi-pizza:before{content:"\F409"}.mdi-plane-shield:before{content:"\F6BA"}.mdi-play:before{content:"\F40A"}.mdi-play-box-outline:before{content:"\F40B"}.mdi-play-circle:before{content:"\F40C"}.mdi-play-circle-outline:before{content:"\F40D"}.mdi-play-pause:before{content:"\F40E"}.mdi-play-protected-content:before{content:"\F40F"}.mdi-playlist-check:before{content:"\F5C7"}.mdi-playlist-minus:before{content:"\F410"}.mdi-playlist-play:before{content:"\F411"}.mdi-playlist-plus:before{content:"\F412"}.mdi-playlist-remove:before{content:"\F413"}.mdi-playstation:before{content:"\F414"}.mdi-plex:before{content:"\F6B9"}.mdi-plus:before{content:"\F415"}.mdi-plus-box:before{content:"\F416"}.mdi-plus-box-outline:before{content:"\F703"}.mdi-plus-circle:before{content:"\F417"}.mdi-plus-circle-multiple-outline:before{content:"\F418"}.mdi-plus-circle-outline:before{content:"\F419"}.mdi-plus-network:before{content:"\F41A"}.mdi-plus-one:before{content:"\F41B"}.mdi-plus-outline:before{content:"\F704"}.mdi-pocket:before{content:"\F41C"}.mdi-pokeball:before{content:"\F41D"}.mdi-polaroid:before{content:"\F41E"}.mdi-poll:before{content:"\F41F"}.mdi-poll-box:before{content:"\F420"}.mdi-polymer:before{content:"\F421"}.mdi-pool:before{content:"\F606"}.mdi-popcorn:before{content:"\F422"}.mdi-pot:before{content:"\F65A"}.mdi-pot-mix:before{content:"\F65B"}.mdi-pound:before{content:"\F423"}.mdi-pound-box:before{content:"\F424"}.mdi-power:before{content:"\F425"}.mdi-power-plug:before{content:"\F6A4"}.mdi-power-plug-off:before{content:"\F6A5"}.mdi-power-settings:before{content:"\F426"}.mdi-power-socket:before{content:"\F427"}.mdi-power-socket-eu:before{content:"\F7E6"}.mdi-power-socket-uk:before{content:"\F7E7"}.mdi-power-socket-us:before{content:"\F7E8"}.mdi-prescription:before{content:"\F705"}.mdi-presentation:before{content:"\F428"}.mdi-presentation-play:before{content:"\F429"}.mdi-printer:before{content:"\F42A"}.mdi-printer-3d:before{content:"\F42B"}.mdi-printer-alert:before{content:"\F42C"}.mdi-printer-settings:before{content:"\F706"}.mdi-priority-high:before{content:"\F603"}.mdi-priority-low:before{content:"\F604"}.mdi-professional-hexagon:before{content:"\F42D"}.mdi-projector:before{content:"\F42E"}.mdi-projector-screen:before{content:"\F42F"}.mdi-publish:before{content:"\F6A6"}.mdi-pulse:before{content:"\F430"}.mdi-puzzle:before{content:"\F431"}.mdi-qqchat:before{content:"\F605"}.mdi-qrcode:before{content:"\F432"}.mdi-qrcode-scan:before{content:"\F433"}.mdi-quadcopter:before{content:"\F434"}.mdi-quality-high:before{content:"\F435"}.mdi-quicktime:before{content:"\F436"}.mdi-radar:before{content:"\F437"}.mdi-radiator:before{content:"\F438"}.mdi-radio:before{content:"\F439"}.mdi-radio-handheld:before{content:"\F43A"}.mdi-radio-tower:before{content:"\F43B"}.mdi-radioactive:before{content:"\F43C"}.mdi-radiobox-blank:before{content:"\F43D"}.mdi-radiobox-marked:before{content:"\F43E"}.mdi-raspberrypi:before{content:"\F43F"}.mdi-ray-end:before{content:"\F440"}.mdi-ray-end-arrow:before{content:"\F441"}.mdi-ray-start:before{content:"\F442"}.mdi-ray-start-arrow:before{content:"\F443"}.mdi-ray-start-end:before{content:"\F444"}.mdi-ray-vertex:before{content:"\F445"}.mdi-rdio:before{content:"\F446"}.mdi-react:before{content:"\F707"}.mdi-read:before{content:"\F447"}.mdi-readability:before{content:"\F448"}.mdi-receipt:before{content:"\F449"}.mdi-record:before{content:"\F44A"}.mdi-record-rec:before{content:"\F44B"}.mdi-recycle:before{content:"\F44C"}.mdi-reddit:before{content:"\F44D"}.mdi-redo:before{content:"\F44E"}.mdi-redo-variant:before{content:"\F44F"}.mdi-refresh:before{content:"\F450"}.mdi-regex:before{content:"\F451"}.mdi-relative-scale:before{content:"\F452"}.mdi-reload:before{content:"\F453"}.mdi-remote:before{content:"\F454"}.mdi-rename-box:before{content:"\F455"}.mdi-reorder-horizontal:before{content:"\F687"}.mdi-reorder-vertical:before{content:"\F688"}.mdi-repeat:before{content:"\F456"}.mdi-repeat-off:before{content:"\F457"}.mdi-repeat-once:before{content:"\F458"}.mdi-replay:before{content:"\F459"}.mdi-reply:before{content:"\F45A"}.mdi-reply-all:before{content:"\F45B"}.mdi-reproduction:before{content:"\F45C"}.mdi-resize-bottom-right:before{content:"\F45D"}.mdi-responsive:before{content:"\F45E"}.mdi-restart:before{content:"\F708"}.mdi-restore:before{content:"\F6A7"}.mdi-rewind:before{content:"\F45F"}.mdi-rewind-outline:before{content:"\F709"}.mdi-rhombus:before{content:"\F70A"}.mdi-rhombus-outline:before{content:"\F70B"}.mdi-ribbon:before{content:"\F460"}.mdi-rice:before{content:"\F7E9"}.mdi-ring:before{content:"\F7EA"}.mdi-road:before{content:"\F461"}.mdi-road-variant:before{content:"\F462"}.mdi-robot:before{content:"\F6A8"}.mdi-rocket:before{content:"\F463"}.mdi-roomba:before{content:"\F70C"}.mdi-rotate-3d:before{content:"\F464"}.mdi-rotate-left:before{content:"\F465"}.mdi-rotate-left-variant:before{content:"\F466"}.mdi-rotate-right:before{content:"\F467"}.mdi-rotate-right-variant:before{content:"\F468"}.mdi-rounded-corner:before{content:"\F607"}.mdi-router-wireless:before{content:"\F469"}.mdi-routes:before{content:"\F46A"}.mdi-rowing:before{content:"\F608"}.mdi-rss:before{content:"\F46B"}.mdi-rss-box:before{content:"\F46C"}.mdi-ruler:before{content:"\F46D"}.mdi-run:before{content:"\F70D"}.mdi-run-fast:before{content:"\F46E"}.mdi-sale:before{content:"\F46F"}.mdi-sass:before{content:"\F7EB"}.mdi-satellite:before{content:"\F470"}.mdi-satellite-variant:before{content:"\F471"}.mdi-saxophone:before{content:"\F609"}.mdi-scale:before{content:"\F472"}.mdi-scale-balance:before{content:"\F5D1"}.mdi-scale-bathroom:before{content:"\F473"}.mdi-scanner:before{content:"\F6AA"}.mdi-school:before{content:"\F474"}.mdi-screen-rotation:before{content:"\F475"}.mdi-screen-rotation-lock:before{content:"\F476"}.mdi-screwdriver:before{content:"\F477"}.mdi-script:before{content:"\F478"}.mdi-sd:before{content:"\F479"}.mdi-seal:before{content:"\F47A"}.mdi-search-web:before{content:"\F70E"}.mdi-seat-flat:before{content:"\F47B"}.mdi-seat-flat-angled:before{content:"\F47C"}.mdi-seat-individual-suite:before{content:"\F47D"}.mdi-seat-legroom-extra:before{content:"\F47E"}.mdi-seat-legroom-normal:before{content:"\F47F"}.mdi-seat-legroom-reduced:before{content:"\F480"}.mdi-seat-recline-extra:before{content:"\F481"}.mdi-seat-recline-normal:before{content:"\F482"}.mdi-security:before{content:"\F483"}.mdi-security-home:before{content:"\F689"}.mdi-security-network:before{content:"\F484"}.mdi-select:before{content:"\F485"}.mdi-select-all:before{content:"\F486"}.mdi-select-inverse:before{content:"\F487"}.mdi-select-off:before{content:"\F488"}.mdi-selection:before{content:"\F489"}.mdi-selection-off:before{content:"\F776"}.mdi-send:before{content:"\F48A"}.mdi-send-secure:before{content:"\F7EC"}.mdi-serial-port:before{content:"\F65C"}.mdi-server:before{content:"\F48B"}.mdi-server-minus:before{content:"\F48C"}.mdi-server-network:before{content:"\F48D"}.mdi-server-network-off:before{content:"\F48E"}.mdi-server-off:before{content:"\F48F"}.mdi-server-plus:before{content:"\F490"}.mdi-server-remove:before{content:"\F491"}.mdi-server-security:before{content:"\F492"}.mdi-set-all:before{content:"\F777"}.mdi-set-center:before{content:"\F778"}.mdi-set-center-right:before{content:"\F779"}.mdi-set-left:before{content:"\F77A"}.mdi-set-left-center:before{content:"\F77B"}.mdi-set-left-right:before{content:"\F77C"}.mdi-set-none:before{content:"\F77D"}.mdi-set-right:before{content:"\F77E"}.mdi-settings:before{content:"\F493"}.mdi-settings-box:before{content:"\F494"}.mdi-shape-circle-plus:before{content:"\F65D"}.mdi-shape-plus:before{content:"\F495"}.mdi-shape-polygon-plus:before{content:"\F65E"}.mdi-shape-rectangle-plus:before{content:"\F65F"}.mdi-shape-square-plus:before{content:"\F660"}.mdi-share:before{content:"\F496"}.mdi-share-variant:before{content:"\F497"}.mdi-shield:before{content:"\F498"}.mdi-shield-half-full:before{content:"\F77F"}.mdi-shield-outline:before{content:"\F499"}.mdi-shopping:before{content:"\F49A"}.mdi-shopping-music:before{content:"\F49B"}.mdi-shovel:before{content:"\F70F"}.mdi-shovel-off:before{content:"\F710"}.mdi-shredder:before{content:"\F49C"}.mdi-shuffle:before{content:"\F49D"}.mdi-shuffle-disabled:before{content:"\F49E"}.mdi-shuffle-variant:before{content:"\F49F"}.mdi-sigma:before{content:"\F4A0"}.mdi-sigma-lower:before{content:"\F62B"}.mdi-sign-caution:before{content:"\F4A1"}.mdi-sign-direction:before{content:"\F780"}.mdi-sign-text:before{content:"\F781"}.mdi-signal:before{content:"\F4A2"}.mdi-signal-2g:before{content:"\F711"}.mdi-signal-3g:before{content:"\F712"}.mdi-signal-4g:before{content:"\F713"}.mdi-signal-hspa:before{content:"\F714"}.mdi-signal-hspa-plus:before{content:"\F715"}.mdi-signal-off:before{content:"\F782"}.mdi-signal-variant:before{content:"\F60A"}.mdi-silverware:before{content:"\F4A3"}.mdi-silverware-fork:before{content:"\F4A4"}.mdi-silverware-spoon:before{content:"\F4A5"}.mdi-silverware-variant:before{content:"\F4A6"}.mdi-sim:before{content:"\F4A7"}.mdi-sim-alert:before{content:"\F4A8"}.mdi-sim-off:before{content:"\F4A9"}.mdi-sitemap:before{content:"\F4AA"}.mdi-skip-backward:before{content:"\F4AB"}.mdi-skip-forward:before{content:"\F4AC"}.mdi-skip-next:before{content:"\F4AD"}.mdi-skip-next-circle:before{content:"\F661"}.mdi-skip-next-circle-outline:before{content:"\F662"}.mdi-skip-previous:before{content:"\F4AE"}.mdi-skip-previous-circle:before{content:"\F663"}.mdi-skip-previous-circle-outline:before{content:"\F664"}.mdi-skull:before{content:"\F68B"}.mdi-skype:before{content:"\F4AF"}.mdi-skype-business:before{content:"\F4B0"}.mdi-slack:before{content:"\F4B1"}.mdi-sleep:before{content:"\F4B2"}.mdi-sleep-off:before{content:"\F4B3"}.mdi-smoking:before{content:"\F4B4"}.mdi-smoking-off:before{content:"\F4B5"}.mdi-snapchat:before{content:"\F4B6"}.mdi-snowflake:before{content:"\F716"}.mdi-snowman:before{content:"\F4B7"}.mdi-soccer:before{content:"\F4B8"}.mdi-sofa:before{content:"\F4B9"}.mdi-solid:before{content:"\F68C"}.mdi-sort:before{content:"\F4BA"}.mdi-sort-alphabetical:before{content:"\F4BB"}.mdi-sort-ascending:before{content:"\F4BC"}.mdi-sort-descending:before{content:"\F4BD"}.mdi-sort-numeric:before{content:"\F4BE"}.mdi-sort-variant:before{content:"\F4BF"}.mdi-soundcloud:before{content:"\F4C0"}.mdi-source-branch:before{content:"\F62C"}.mdi-source-commit:before{content:"\F717"}.mdi-source-commit-end:before{content:"\F718"}.mdi-source-commit-end-local:before{content:"\F719"}.mdi-source-commit-local:before{content:"\F71A"}.mdi-source-commit-next-local:before{content:"\F71B"}.mdi-source-commit-start:before{content:"\F71C"}.mdi-source-commit-start-next-local:before{content:"\F71D"}.mdi-source-fork:before{content:"\F4C1"}.mdi-source-merge:before{content:"\F62D"}.mdi-source-pull:before{content:"\F4C2"}.mdi-soy-sauce:before{content:"\F7ED"}.mdi-speaker:before{content:"\F4C3"}.mdi-speaker-off:before{content:"\F4C4"}.mdi-speaker-wireless:before{content:"\F71E"}.mdi-speedometer:before{content:"\F4C5"}.mdi-spellcheck:before{content:"\F4C6"}.mdi-spotify:before{content:"\F4C7"}.mdi-spotlight:before{content:"\F4C8"}.mdi-spotlight-beam:before{content:"\F4C9"}.mdi-spray:before{content:"\F665"}.mdi-square:before{content:"\F763"}.mdi-square-inc:before{content:"\F4CA"}.mdi-square-inc-cash:before{content:"\F4CB"}.mdi-square-outline:before{content:"\F762"}.mdi-square-root:before{content:"\F783"}.mdi-stackexchange:before{content:"\F60B"}.mdi-stackoverflow:before{content:"\F4CC"}.mdi-stadium:before{content:"\F71F"}.mdi-stairs:before{content:"\F4CD"}.mdi-standard-definition:before{content:"\F7EE"}.mdi-star:before{content:"\F4CE"}.mdi-star-circle:before{content:"\F4CF"}.mdi-star-half:before{content:"\F4D0"}.mdi-star-off:before{content:"\F4D1"}.mdi-star-outline:before{content:"\F4D2"}.mdi-steam:before{content:"\F4D3"}.mdi-steering:before{content:"\F4D4"}.mdi-step-backward:before{content:"\F4D5"}.mdi-step-backward-2:before{content:"\F4D6"}.mdi-step-forward:before{content:"\F4D7"}.mdi-step-forward-2:before{content:"\F4D8"}.mdi-stethoscope:before{content:"\F4D9"}.mdi-sticker:before{content:"\F5D0"}.mdi-sticker-emoji:before{content:"\F784"}.mdi-stocking:before{content:"\F4DA"}.mdi-stop:before{content:"\F4DB"}.mdi-stop-circle:before{content:"\F666"}.mdi-stop-circle-outline:before{content:"\F667"}.mdi-store:before{content:"\F4DC"}.mdi-store-24-hour:before{content:"\F4DD"}.mdi-stove:before{content:"\F4DE"}.mdi-subdirectory-arrow-left:before{content:"\F60C"}.mdi-subdirectory-arrow-right:before{content:"\F60D"}.mdi-subway:before{content:"\F6AB"}.mdi-subway-variant:before{content:"\F4DF"}.mdi-summit:before{content:"\F785"}.mdi-sunglasses:before{content:"\F4E0"}.mdi-surround-sound:before{content:"\F5C5"}.mdi-surround-sound-2-0:before{content:"\F7EF"}.mdi-surround-sound-3-1:before{content:"\F7F0"}.mdi-surround-sound-5-1:before{content:"\F7F1"}.mdi-surround-sound-7-1:before{content:"\F7F2"}.mdi-svg:before{content:"\F720"}.mdi-swap-horizontal:before{content:"\F4E1"}.mdi-swap-vertical:before{content:"\F4E2"}.mdi-swim:before{content:"\F4E3"}.mdi-switch:before{content:"\F4E4"}.mdi-sword:before{content:"\F4E5"}.mdi-sword-cross:before{content:"\F786"}.mdi-sync:before{content:"\F4E6"}.mdi-sync-alert:before{content:"\F4E7"}.mdi-sync-off:before{content:"\F4E8"}.mdi-tab:before{content:"\F4E9"}.mdi-tab-plus:before{content:"\F75B"}.mdi-tab-unselected:before{content:"\F4EA"}.mdi-table:before{content:"\F4EB"}.mdi-table-column-plus-after:before{content:"\F4EC"}.mdi-table-column-plus-before:before{content:"\F4ED"}.mdi-table-column-remove:before{content:"\F4EE"}.mdi-table-column-width:before{content:"\F4EF"}.mdi-table-edit:before{content:"\F4F0"}.mdi-table-large:before{content:"\F4F1"}.mdi-table-row-height:before{content:"\F4F2"}.mdi-table-row-plus-after:before{content:"\F4F3"}.mdi-table-row-plus-before:before{content:"\F4F4"}.mdi-table-row-remove:before{content:"\F4F5"}.mdi-tablet:before{content:"\F4F6"}.mdi-tablet-android:before{content:"\F4F7"}.mdi-tablet-ipad:before{content:"\F4F8"}.mdi-taco:before{content:"\F761"}.mdi-tag:before{content:"\F4F9"}.mdi-tag-faces:before{content:"\F4FA"}.mdi-tag-heart:before{content:"\F68A"}.mdi-tag-multiple:before{content:"\F4FB"}.mdi-tag-outline:before{content:"\F4FC"}.mdi-tag-plus:before{content:"\F721"}.mdi-tag-remove:before{content:"\F722"}.mdi-tag-text-outline:before{content:"\F4FD"}.mdi-target:before{content:"\F4FE"}.mdi-taxi:before{content:"\F4FF"}.mdi-teamviewer:before{content:"\F500"}.mdi-telegram:before{content:"\F501"}.mdi-television:before{content:"\F502"}.mdi-television-classic:before{content:"\F7F3"}.mdi-television-guide:before{content:"\F503"}.mdi-temperature-celsius:before{content:"\F504"}.mdi-temperature-fahrenheit:before{content:"\F505"}.mdi-temperature-kelvin:before{content:"\F506"}.mdi-tennis:before{content:"\F507"}.mdi-tent:before{content:"\F508"}.mdi-terrain:before{content:"\F509"}.mdi-test-tube:before{content:"\F668"}.mdi-text-shadow:before{content:"\F669"}.mdi-text-to-speech:before{content:"\F50A"}.mdi-text-to-speech-off:before{content:"\F50B"}.mdi-textbox:before{content:"\F60E"}.mdi-textbox-password:before{content:"\F7F4"}.mdi-texture:before{content:"\F50C"}.mdi-theater:before{content:"\F50D"}.mdi-theme-light-dark:before{content:"\F50E"}.mdi-thermometer:before{content:"\F50F"}.mdi-thermometer-lines:before{content:"\F510"}.mdi-thought-bubble:before{content:"\F7F5"}.mdi-thought-bubble-outline:before{content:"\F7F6"}.mdi-thumb-down:before{content:"\F511"}.mdi-thumb-down-outline:before{content:"\F512"}.mdi-thumb-up:before{content:"\F513"}.mdi-thumb-up-outline:before{content:"\F514"}.mdi-thumbs-up-down:before{content:"\F515"}.mdi-ticket:before{content:"\F516"}.mdi-ticket-account:before{content:"\F517"}.mdi-ticket-confirmation:before{content:"\F518"}.mdi-ticket-percent:before{content:"\F723"}.mdi-tie:before{content:"\F519"}.mdi-tilde:before{content:"\F724"}.mdi-timelapse:before{content:"\F51A"}.mdi-timer:before{content:"\F51B"}.mdi-timer-10:before{content:"\F51C"}.mdi-timer-3:before{content:"\F51D"}.mdi-timer-off:before{content:"\F51E"}.mdi-timer-sand:before{content:"\F51F"}.mdi-timer-sand-empty:before{content:"\F6AC"}.mdi-timer-sand-full:before{content:"\F78B"}.mdi-timetable:before{content:"\F520"}.mdi-toggle-switch:before{content:"\F521"}.mdi-toggle-switch-off:before{content:"\F522"}.mdi-tooltip:before{content:"\F523"}.mdi-tooltip-edit:before{content:"\F524"}.mdi-tooltip-image:before{content:"\F525"}.mdi-tooltip-outline:before{content:"\F526"}.mdi-tooltip-outline-plus:before{content:"\F527"}.mdi-tooltip-text:before{content:"\F528"}.mdi-tooth:before{content:"\F529"}.mdi-tor:before{content:"\F52A"}.mdi-tower-beach:before{content:"\F680"}.mdi-tower-fire:before{content:"\F681"}.mdi-trackpad:before{content:"\F7F7"}.mdi-traffic-light:before{content:"\F52B"}.mdi-train:before{content:"\F52C"}.mdi-tram:before{content:"\F52D"}.mdi-transcribe:before{content:"\F52E"}.mdi-transcribe-close:before{content:"\F52F"}.mdi-transfer:before{content:"\F530"}.mdi-transit-transfer:before{content:"\F6AD"}.mdi-translate:before{content:"\F5CA"}.mdi-treasure-chest:before{content:"\F725"}.mdi-tree:before{content:"\F531"}.mdi-trello:before{content:"\F532"}.mdi-trending-down:before{content:"\F533"}.mdi-trending-neutral:before{content:"\F534"}.mdi-trending-up:before{content:"\F535"}.mdi-triangle:before{content:"\F536"}.mdi-triangle-outline:before{content:"\F537"}.mdi-trophy:before{content:"\F538"}.mdi-trophy-award:before{content:"\F539"}.mdi-trophy-outline:before{content:"\F53A"}.mdi-trophy-variant:before{content:"\F53B"}.mdi-trophy-variant-outline:before{content:"\F53C"}.mdi-truck:before{content:"\F53D"}.mdi-truck-delivery:before{content:"\F53E"}.mdi-truck-fast:before{content:"\F787"}.mdi-truck-trailer:before{content:"\F726"}.mdi-tshirt-crew:before{content:"\F53F"}.mdi-tshirt-v:before{content:"\F540"}.mdi-tumblr:before{content:"\F541"}.mdi-tumblr-reblog:before{content:"\F542"}.mdi-tune:before{content:"\F62E"}.mdi-tune-vertical:before{content:"\F66A"}.mdi-twitch:before{content:"\F543"}.mdi-twitter:before{content:"\F544"}.mdi-twitter-box:before{content:"\F545"}.mdi-twitter-circle:before{content:"\F546"}.mdi-twitter-retweet:before{content:"\F547"}.mdi-uber:before{content:"\F748"}.mdi-ubuntu:before{content:"\F548"}.mdi-ultra-high-definition:before{content:"\F7F8"}.mdi-umbraco:before{content:"\F549"}.mdi-umbrella:before{content:"\F54A"}.mdi-umbrella-outline:before{content:"\F54B"}.mdi-undo:before{content:"\F54C"}.mdi-undo-variant:before{content:"\F54D"}.mdi-unfold-less-horizontal:before{content:"\F54E"}.mdi-unfold-less-vertical:before{content:"\F75F"}.mdi-unfold-more-horizontal:before{content:"\F54F"}.mdi-unfold-more-vertical:before{content:"\F760"}.mdi-ungroup:before{content:"\F550"}.mdi-unity:before{content:"\F6AE"}.mdi-untappd:before{content:"\F551"}.mdi-update:before{content:"\F6AF"}.mdi-upload:before{content:"\F552"}.mdi-upload-network:before{content:"\F6F5"}.mdi-usb:before{content:"\F553"}.mdi-van-passenger:before{content:"\F7F9"}.mdi-van-utility:before{content:"\F7FA"}.mdi-vanish:before{content:"\F7FB"}.mdi-vector-arrange-above:before{content:"\F554"}.mdi-vector-arrange-below:before{content:"\F555"}.mdi-vector-circle:before{content:"\F556"}.mdi-vector-circle-variant:before{content:"\F557"}.mdi-vector-combine:before{content:"\F558"}.mdi-vector-curve:before{content:"\F559"}.mdi-vector-difference:before{content:"\F55A"}.mdi-vector-difference-ab:before{content:"\F55B"}.mdi-vector-difference-ba:before{content:"\F55C"}.mdi-vector-intersection:before{content:"\F55D"}.mdi-vector-line:before{content:"\F55E"}.mdi-vector-point:before{content:"\F55F"}.mdi-vector-polygon:before{content:"\F560"}.mdi-vector-polyline:before{content:"\F561"}.mdi-vector-radius:before{content:"\F749"}.mdi-vector-rectangle:before{content:"\F5C6"}.mdi-vector-selection:before{content:"\F562"}.mdi-vector-square:before{content:"\F001"}.mdi-vector-triangle:before{content:"\F563"}.mdi-vector-union:before{content:"\F564"}.mdi-verified:before{content:"\F565"}.mdi-vibrate:before{content:"\F566"}.mdi-video:before{content:"\F567"}.mdi-video-3d:before{content:"\F7FC"}.mdi-video-off:before{content:"\F568"}.mdi-video-switch:before{content:"\F569"}.mdi-view-agenda:before{content:"\F56A"}.mdi-view-array:before{content:"\F56B"}.mdi-view-carousel:before{content:"\F56C"}.mdi-view-column:before{content:"\F56D"}.mdi-view-dashboard:before{content:"\F56E"}.mdi-view-day:before{content:"\F56F"}.mdi-view-grid:before{content:"\F570"}.mdi-view-headline:before{content:"\F571"}.mdi-view-list:before{content:"\F572"}.mdi-view-module:before{content:"\F573"}.mdi-view-parallel:before{content:"\F727"}.mdi-view-quilt:before{content:"\F574"}.mdi-view-sequential:before{content:"\F728"}.mdi-view-stream:before{content:"\F575"}.mdi-view-week:before{content:"\F576"}.mdi-vimeo:before{content:"\F577"}.mdi-vine:before{content:"\F578"}.mdi-violin:before{content:"\F60F"}.mdi-visualstudio:before{content:"\F610"}.mdi-vk:before{content:"\F579"}.mdi-vk-box:before{content:"\F57A"}.mdi-vk-circle:before{content:"\F57B"}.mdi-vlc:before{content:"\F57C"}.mdi-voice:before{content:"\F5CB"}.mdi-voicemail:before{content:"\F57D"}.mdi-volume-high:before{content:"\F57E"}.mdi-volume-low:before{content:"\F57F"}.mdi-volume-medium:before{content:"\F580"}.mdi-volume-minus:before{content:"\F75D"}.mdi-volume-mute:before{content:"\F75E"}.mdi-volume-off:before{content:"\F581"}.mdi-volume-plus:before{content:"\F75C"}.mdi-vpn:before{content:"\F582"}.mdi-walk:before{content:"\F583"}.mdi-wall:before{content:"\F7FD"}.mdi-wallet:before{content:"\F584"}.mdi-wallet-giftcard:before{content:"\F585"}.mdi-wallet-membership:before{content:"\F586"}.mdi-wallet-travel:before{content:"\F587"}.mdi-wan:before{content:"\F588"}.mdi-washing-machine:before{content:"\F729"}.mdi-watch:before{content:"\F589"}.mdi-watch-export:before{content:"\F58A"}.mdi-watch-import:before{content:"\F58B"}.mdi-watch-vibrate:before{content:"\F6B0"}.mdi-water:before{content:"\F58C"}.mdi-water-off:before{content:"\F58D"}.mdi-water-percent:before{content:"\F58E"}.mdi-water-pump:before{content:"\F58F"}.mdi-watermark:before{content:"\F612"}.mdi-waves:before{content:"\F78C"}.mdi-weather-cloudy:before{content:"\F590"}.mdi-weather-fog:before{content:"\F591"}.mdi-weather-hail:before{content:"\F592"}.mdi-weather-lightning:before{content:"\F593"}.mdi-weather-lightning-rainy:before{content:"\F67D"}.mdi-weather-night:before{content:"\F594"}.mdi-weather-partlycloudy:before{content:"\F595"}.mdi-weather-pouring:before{content:"\F596"}.mdi-weather-rainy:before{content:"\F597"}.mdi-weather-snowy:before{content:"\F598"}.mdi-weather-snowy-rainy:before{content:"\F67E"}.mdi-weather-sunny:before{content:"\F599"}.mdi-weather-sunset:before{content:"\F59A"}.mdi-weather-sunset-down:before{content:"\F59B"}.mdi-weather-sunset-up:before{content:"\F59C"}.mdi-weather-windy:before{content:"\F59D"}.mdi-weather-windy-variant:before{content:"\F59E"}.mdi-web:before{content:"\F59F"}.mdi-webcam:before{content:"\F5A0"}.mdi-webhook:before{content:"\F62F"}.mdi-webpack:before{content:"\F72A"}.mdi-wechat:before{content:"\F611"}.mdi-weight:before{content:"\F5A1"}.mdi-weight-kilogram:before{content:"\F5A2"}.mdi-whatsapp:before{content:"\F5A3"}.mdi-wheelchair-accessibility:before{content:"\F5A4"}.mdi-white-balance-auto:before{content:"\F5A5"}.mdi-white-balance-incandescent:before{content:"\F5A6"}.mdi-white-balance-iridescent:before{content:"\F5A7"}.mdi-white-balance-sunny:before{content:"\F5A8"}.mdi-widgets:before{content:"\F72B"}.mdi-wifi:before{content:"\F5A9"}.mdi-wifi-off:before{content:"\F5AA"}.mdi-wii:before{content:"\F5AB"}.mdi-wiiu:before{content:"\F72C"}.mdi-wikipedia:before{content:"\F5AC"}.mdi-window-close:before{content:"\F5AD"}.mdi-window-closed:before{content:"\F5AE"}.mdi-window-maximize:before{content:"\F5AF"}.mdi-window-minimize:before{content:"\F5B0"}.mdi-window-open:before{content:"\F5B1"}.mdi-window-restore:before{content:"\F5B2"}.mdi-windows:before{content:"\F5B3"}.mdi-wordpress:before{content:"\F5B4"}.mdi-worker:before{content:"\F5B5"}.mdi-wrap:before{content:"\F5B6"}.mdi-wrench:before{content:"\F5B7"}.mdi-wunderlist:before{content:"\F5B8"}.mdi-xaml:before{content:"\F673"}.mdi-xbox:before{content:"\F5B9"}.mdi-xbox-controller:before{content:"\F5BA"}.mdi-xbox-controller-battery-alert:before{content:"\F74A"}.mdi-xbox-controller-battery-empty:before{content:"\F74B"}.mdi-xbox-controller-battery-full:before{content:"\F74C"}.mdi-xbox-controller-battery-low:before{content:"\F74D"}.mdi-xbox-controller-battery-medium:before{content:"\F74E"}.mdi-xbox-controller-battery-unknown:before{content:"\F74F"}.mdi-xbox-controller-off:before{content:"\F5BB"}.mdi-xda:before{content:"\F5BC"}.mdi-xing:before{content:"\F5BD"}.mdi-xing-box:before{content:"\F5BE"}.mdi-xing-circle:before{content:"\F5BF"}.mdi-xml:before{content:"\F5C0"}.mdi-xmpp:before{content:"\F7FE"}.mdi-yammer:before{content:"\F788"}.mdi-yeast:before{content:"\F5C1"}.mdi-yelp:before{content:"\F5C2"}.mdi-yin-yang:before{content:"\F67F"}.mdi-youtube-play:before{content:"\F5C3"}.mdi-zip-box:before{content:"\F5C4"}.mdi-blank:before{content:"\F68C";visibility:hidden}.mdi-18px.mdi-set,.mdi-18px.mdi:before{font-size:18px}.mdi-24px.mdi-set,.mdi-24px.mdi:before{font-size:24px}.mdi-36px.mdi-set,.mdi-36px.mdi:before{font-size:36px}.mdi-48px.mdi-set,.mdi-48px.mdi:before{font-size:48px}.mdi-dark:before{color:rgba(0,0,0,0.54)}.mdi-dark.mdi-inactive:before{color:rgba(0,0,0,0.26)}.mdi-light:before{color:#fff}.mdi-light.mdi-inactive:before{color:rgba(255,255,255,0.3)}.mdi-rotate-45:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.mdi-rotate-90:before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.mdi-rotate-135:before{-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg)}.mdi-rotate-180:before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.mdi-rotate-225:before{-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg)}.mdi-rotate-270:before{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.mdi-rotate-315:before{-webkit-transform:rotate(315deg);-ms-transform:rotate(315deg);transform:rotate(315deg)}.mdi-flip-h:before{-webkit-transform:scaleX(-1);transform:scaleX(-1);filter:FlipH;-ms-filter:"FlipH"}.mdi-flip-v:before{-webkit-transform:scaleY(-1);transform:scaleY(-1);filter:FlipV;-ms-filter:"FlipV"}.mdi-spin:before{-webkit-animation:mdi-spin 2s infinite linear;animation:mdi-spin 2s infinite linear}@-webkit-keyframes mdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes mdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}} diff --git a/admin/css/style.min.css b/admin/css/style.min.css new file mode 100644 index 0000000..8c211ab --- /dev/null +++ b/admin/css/style.min.css @@ -0,0 +1,4538 @@ +/** ---------------------------------- + * 光年(Light Year Admin)后台管理系统模板 + * 基于Bootstrap v3.3.7 + * http://www.itshubao.com + * yinqi<3331653644@qq.com> + -------------------------------------- */ +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; + color: #4d5259; + line-height: 1.5; + font-size: 14px; + overflow-x: hidden; + background-color: #f5f6fa; +} +html, +body { + height: 100%; +} +a { + color: #33cabb; + -webkit-transition: .2s linear; + transition: .2s linear +} +a:hover, +a:focus { + color: #4d5259; + text-decoration: none; + outline: none +} +a:hover, +a:focus, +a:active { + text-decoration: none; +} +a, +button, +a:focus, +a:active, +button:focus, +button:active { + outline: none !important; +} +blockquote { + font-size: 16px; +} +img { + max-width: 100%; +} +pre { + background-color: #f9fafb; + border: none; + border-left: 5px solid #ebebeb; + padding: 12px; + border-radius: 3px; + color: #616a78; +} + +/** ---------------------------------- + * 示例中用到的样式,可删除 + -------------------------------------- */ +.example-box .btn { + margin-bottom: 10px; + margin-right: 6px; +} + +/** ---------------------------------- + * 重设样式 + -------------------------------------- */ + +/* 标题 */ +h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { + font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC', 'WenQuanYi Micro Hei', sans-serif; + color: #313944; + line-height: 1.5; + letter-spacing: .5px; +} +.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { + margin-top: 0; + margin-bottom: .5rem; +} + +/* 导航相关 */ +.navbar-toggle { + background-color: transparent; + border-color: transparent!important; +} +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background-color: transparent; +} +.navbar-default .navbar-toggle .icon-bar { + background-color: #4d5259; +} +.nav > li > a:focus { + background-color: transparent; +} +.nav > li > a:hover { + background-color: rgba(0,0,0,.0085); +} +.nav .open > a, +.nav .open > a:focus, +.nav .open > a:hover { + background-color: transparent; + border-color: transparent; +} + +/* 下拉 */ +.dropdown-menu { + border-radius: 0; + border: none; + /*border: 1px solid rgba(235, 235, 235, 0.4);*/ + -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.075); + box-shadow: 0 0 4px rgba(0, 0, 0, 0.075); +} +.dropdown-menu > li > a:focus, .dropdown-menu > li > a:hover { + background-color: #f9fafb; +} +.dropdown-menu .divider { + background-color: #f1f2f3; +} +.dropdown-menu > li > a { + padding-top: 8px; + padding-bottom: 8px; +} +.dropdown-menu > li > a > i { + margin-right: 10px; +} +.dropdown-menu>.active>a, +.dropdown-menu>.active>a:focus, +.dropdown-menu>.active>a:hover { + background-color: #33cabb; +} + +/* 表格 */ +.table-bordered { + border-color: #eceeef; +} +.table>tbody>tr>td, +.table>tbody>tr>th, +.table>tfoot>tr>td, +.table>tfoot>tr>th, +.table>thead>tr>td, +.table>thead>tr>th { + /*padding: .75em;*/ + vertical-align: middle; + padding: 10px; + line-height: 1.5; + border-color: #eceeef; +} +.table-striped tbody tr:nth-of-type(odd) { + background-color: #fafafa; +} +.table-hover > tbody > tr:hover { + background-color: #F1FBFB; +} +.table-vcenter > thead > tr > th, +.table-vcenter > thead > tr > td, +.table-vcenter > tbody > tr > th, +.table-vcenter > tbody > tr > td, +.table-vcenter > tfoot > tr > th, +.table-vcenter > tfoot > tr > td { + vertical-align: middle; +} +.table-hover tbody tr { + -webkit-transition: background-color 0.2s linear; + transition: background-color 0.2s linear; +} +.table-condensed > tbody > tr > td, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > td, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > thead > tr > th { + padding: .5em; +} + +/* 标签 */ +.label { + padding-top: .3em; + border-radius: 2px; + font-weight: 300; +} +.label-default { + background-color: #f5f6f7; + color: #8b95a5; +} +.label-primary { + background-color: #33cabb; +} +.label-success { + background-color: #15c377; +} +.label-info { + background-color: #48b0f7; +} +.label-warning { + background-color: #faa64b; +} +.label-danger { + background-color: #f96868; +} +.label-dark { + background-color: #465161; +} +.label-secondary { + background-color: #e4e7ea; + color: #4d5259; +} +.label-purple { + background-color: #926dde; +} +.label-pink { + background-color: #f96197; +} +.label-cyan { + background-color: #57c7d4; +} +.label-yellow { + background-color: #fcc525; +} +.label-brown { + background-color: #8d6658; +} +[class*='label-outline-'] { + position: relative; + border: 1px solid #ebebeb; + color: #4d5259; + font-size: 12px; +} +[class*='label-outline-']:before { + content: ""; + margin-right: 5px; + width: 8px; + height: 8px; + display: inline-block; + -wekit-border-radius: 50%; + border-radius: 50%; +} +.label-outline-default::before { + background-color: #f5f6f7; +} +.label-outline-primary::before { + background-color: #33cabb; +} +.label-outline-success::before { + background-color: #15c377; +} +.label-outline-info::before { + background-color: #48b0f7; +} +.label-outline-warning::before { + background-color: #faa64b; +} +.label-outline-danger::before { + background-color: #f96868; +} +.label-outline-dark::before { + background-color: #465161; +} +.label-outline-secondary::before { + background-color: #e4e7ea; +} +.label-outline-purple::before { + background-color: #926dde; +} +.label-outline-pink::before { + background-color: #f96197; +} +.label-outline-cyan::before { + background-color: #57c7d4; +} +.label-outline-yellow::before { + background-color: #fcc525; +} +.label-outline-brown::before { + background-color: #8d6658; +} +/* 淡一些的颜色 */ +.label-primary-light { + background-color: rgba(51, 202, 187, .15); + color: #33cabb; +} +.label-success-light { + background-color: rgba(21, 195, 119, .15); + color: #15c377; +} +.label-info-light { + background-color: rgba(72,176,247, .15); + color: #48b0f7; +} +.label-warning-light { + background-color: rgba(250,166,75, .15); + color: #faa64b; +} +.label-danger-light { + background-color: rgba(249,104,104, .15); + color: #f96868; +} +.label-purple-light { + background-color: rgba(146,109,222, .15); + color: #926dde; +} +.label-pink-light { + background-color: rgba(249,97,151, .15); + color: #f96197; +} +.label-cyan-light { + background-color: rgba(87,199,212, .15); + color: #57c7d4; +} +.label-yellow-light { + background-color: rgba(252,197,37, .15); + color: #fcc525; +} +.label-brown-light { + background-color: rgba(141,102,88, .15); + color: #8d6658; +} + +/* well */ +.well { + border-radius: 2px; + background-color: #f7f7f7; + border-color: #f0f0f0; + -webkit-box-shadow: none; + box-shadow: none; +} + +/* 面板 */ +.panel { + border-color: #f0f0f0; + -webkit-box-shadow: none; + box-shadow: none; + margin-bottom: 30px; +} +.panel a:hover, +.panel a:focus, +.panel a:active { + color: inherit; +} +.panel-heading { + -webkit-border-radius: 0px; + border-radius: 0px; +} +.panel-default>.panel-heading, +.panel-default>.panel-heading+.panel-collapse>.panel-body { + border-color: #f0f0f0; +} +.panel-primary>.panel-heading { + background-color: #33cabb; + border-color: #33cabb; +} +.panel-primary { + border-color: #33cabb; +} +.panel-primary>.panel-heading+.panel-collapse>.panel-body { + border-top-color: #33cabb; +} +.panel-primary > .panel-heading .badge { + color: #33cabb; +} +.panel-success>.panel-heading { + color: #fff; + background-color: #15c377; + border-color: #15c377; +} +.panel-success { + border-color: #15c377; +} +.panel-success>.panel-heading+.panel-collapse>.panel-body { + border-top-color: #15c377; +} +.panel-success > .panel-heading .badge { + background-color: #fff; + color: #15c377; +} +.panel-info>.panel-heading { + color: #fff; + background-color: #48b0f7; + border-color: #48b0f7; +} +.panel-info { + border-color: #48b0f7; +} +.panel-info>.panel-heading+.panel-collapse>.panel-body { + border-top-color: #48b0f7; +} +.panel-info > .panel-heading .badge { + background-color: #fff; + color: #48b0f7; +} +.panel-warning>.panel-heading { + color: #fff; + background-color: #faa64b; + border-color: #faa64b; +} +.panel-warning { + border-color: #faa64b; +} +.panel-warning>.panel-heading+.panel-collapse>.panel-body { + border-top-color: #faa64b; +} +.panel-warning > .panel-heading .badge { + background-color: #fff; + color: #faa64b; +} +.panel-danger>.panel-heading { + color: #fff; + background-color: #f96868; + border-color: #f96868; +} +.panel-danger { + border-color: #f96868; +} +.panel-danger>.panel-heading+.panel-collapse>.panel-body { + border-top-color: #f96868; +} +.panel-danger > .panel-heading .badge { + background-color: #fff; + color: #f96868; +} +.panel-dark>.panel-heading { + color: #fff; + background-color: #465161; + border-color: #465161; +} +.panel-dark { + border-color: #465161; +} +.panel-dark>.panel-heading+.panel-collapse>.panel-body { + border-top-color: #465161; +} +.panel-secondary>.panel-heading { + background-color: #e4e7ea; + border-color: #e4e7ea; +} +.panel-secondary { + border-color: #e4e7ea; +} +.panel-secondary>.panel-heading+.panel-collapse>.panel-body { + border-top-color: #e4e7ea; +} +.panel-purple>.panel-heading { + color: #fff; + background-color: #926dde; + border-color: #926dde; +} +.panel-purple { + border-color: #926dde; +} +.panel-purple>.panel-heading+.panel-collapse>.panel-body { + border-top-color: #926dde; +} +.panel-pink>.panel-heading { + color: #fff; + background-color: #f96197; + border-color: #f96197; +} +.panel-pink { + border-color: #f96197; +} +.panel-pink>.panel-heading+.panel-collapse>.panel-body { + border-top-color: #f96197; +} +.panel-cyan>.panel-heading { + color: #fff; + background-color: #57c7d4; + border-color: #57c7d4; +} +.panel-cyan { + border-color: #57c7d4; +} +.panel-cyan>.panel-heading+.panel-collapse>.panel-body { + border-top-color: #57c7d4; +} + +/* 列表组 */ +.list-group-item { + border-color: #f0f0f0; +} +a.list-group-item:focus, +a.list-group-item:hover, +button.list-group-item:focus, +button.list-group-item:hover { + background-color: #f9fafb; +} +.list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover { + background-color: #33cabb; + border-color: #33cabb; +} +.list-group-item:first-child { + border-top-left-radius: 2px; + border-top-right-radius: 2px; +} +.list-group-item:last-child { + border-bottom-right-radius: 2px; + border-bottom-left-radius: 2px; +} + +/* 表单 */ +.form-control { + height: 38px; + border-color: #ebebeb; + -webkit-border-radius: 2px; + border-radius: 2px; + padding: 5px 12px; + line-height: inherit; + -webkit-transition: 0.2s linear; + transition: 0.2s linear; + -webkit-box-shadow: none; + box-shadow: none; +} +.form-control:focus { + border-color: #33cabb; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(51, 202, 187, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(51, 202, 187, .6); +} +.input-group-addon { + border-color: #ebebeb; + background-color: #f9fafb; + -webkit-border-radius: 2px; + border-radius: 2px; +} +.input-group-lg>.form-control, .input-group-lg>.input-group-addon, .input-group-lg>.input-group-btn>.btn { + -webkit-border-radius: 2px; + border-radius: 2px; +} +.input-sm { + height: 30px; +} +.input-lg { + height: 46px; +} +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline, +.has-success.radio label, +.has-success.checkbox label, +.has-success.radio-inline label, +.has-success.checkbox-inline label { + color: #15c377; +} +.has-success .form-control { + border-color: #15c377!important; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)!important; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)!important; +} +.has-success .form-control:focus { + border-color: #15c377!important; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(21, 195, 119, .6)!important; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(21, 195, 119, .6)!important; +} +.has-success .input-group-addon { + color: #15c377; + background-color: #dff0d8; + border-color: #15c377; +} +.has-success .form-control-feedback { + color: #15c377; +} +.has-info .help-block, +.has-info .control-label, +.has-info .radio, +.has-info .checkbox, +.has-info .radio-inline, +.has-info .checkbox-inline, +.has-info.radio label, +.has-info.checkbox label, +.has-info.radio-inline label, +.has-info.checkbox-inline label { + color: #48b0f7; +} +.has-info .form-control { + border-color: #48b0f7!important; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)!important; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)!important; +} +.has-info .form-control:focus { + border-color: #48b0f7!important; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(72, 176, 247, .6)!important; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(72, 176, 247, .6)!important; +} +.has-info .input-group-addon { + color: #48b0f7; + background-color: #dff0d8; + border-color: #48b0f7; +} +.has-info .form-control-feedback { + color: #48b0f7; +} +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline, +.has-warning.radio label, +.has-warning.checkbox label, +.has-warning.radio-inline label, +.has-warning.checkbox-inline label { + color: #faa64b; +} +.has-warning .form-control { + border-color: #faa64b!important; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)!important; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)!important; +} +.has-warning .form-control:focus { + border-color: #faa64b!important; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px rgba(250, 166, 75, .6)!important; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px rgba(250, 166, 75, .6)!important; +} +.has-warning .input-group-addon { + color: #faa64b; + background-color: #fcf8e3; + border-color: #faa64b; +} +.has-warning .form-control-feedback { + color: #faa64b; +} +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline, +.has-error.radio label, +.has-error.checkbox label, +.has-error.radio-inline label, +.has-error.checkbox-inline label { + color: #f96868; +} +.has-error .form-control { + border-color: #f96868!important; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)!important; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)!important; +} +.has-error .form-control:focus { + border-color: #f96868!important; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px rgba(249, 104, 104, .6)!important; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px rgba(249, 104, 104, .6)!important; +} +.has-error .input-group-addon { + color: #f96868; + background-color: #f2dede; + border-color: #f96868; +} +.has-error .form-control-feedback { + color: #f96868; +} + +/* 复选框 & 单选框 */ +.lyear-checkbox, +.lyear-radio { + display: block; + position: relative; + margin-top: 0px; + margin-bottom: 0px; + cursor: pointer; + padding-left: 30px; + padding-right: 10px; + font-weight: 400; + min-height: 18px; + height: auto!important; + line-height: 18px!important; +} +input[type=checkbox], +input[type=radio] { + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} +.lyear-checkbox input, +.lyear-radio input { + position: absolute;; + /*opacity: 0;*/ + display: none; +} +.lyear-checkbox span::before, +.lyear-radio span::before { + content: ''; + position: absolute; + display: inline-block; + height: 18px; + width: 18px; + left: 0; + top: 0px; + border: 2px solid #ebebeb;; + -webkit-transition: all .1s; + -o-transition: all .1s; + transition: all .1s; +} +.lyear-checkbox span::after, +.lyear-radio span::after { + content: ''; + position: absolute; + display: none; + width: 5px; + height: 10px; + left: 7px; + top: 3px; + border: solid #4d5259; + border-width: 0 2px 2px 0; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} +.lyear-checkbox span, +.lyear-radio span { + display: inline-block; +} +.lyear-checkbox input:checked~span:after, +.lyear-radio input:checked~span:after { + display: inline-block; +} +.lyear-checkbox:hover span::before, +.lyear-radio:hover span::before { + border-color: #ebebeb; +} +.lyear-checkbox.checkbox-grey span::before, +.lyear-checkbox.radio-grey span::before, +.lyear-radio.checkbox-grey span::before, +.lyear-radio.radio-grey span::before { + background-color: #ebebeb; + border-color: #ebebeb; +} +.lyear-checkbox input:disabled + span, +.lyear-radio input:disabled + span { + cursor: not-allowed; +} +.lyear-checkbox input:disabled + span::before, +.lyear-checkbox input:disabled + span::after, +.lyear-radio input:disabled + span::before, +.lyear-radio input:disabled + span::after { + opacity: .4; +} +/* checkbox */ +.checkbox-primary input:checked~span::before { + background-color: #33cabb; + border-color: #33cabb; +} +.checkbox-primary input:checked~span::after { + border-color: #fff; +} +.checkbox-success input:checked~span::before { + background-color: #15c377; + border-color: #15c377; +} +.checkbox-success input:checked~span::after { + border-color: #fff; +} +.checkbox-info input:checked~span::before { + background-color: #48b0f7; + border-color: #48b0f7; +} +.checkbox-info input:checked~span::after { + border-color: #fff; +} +.checkbox-warning input:checked~span::before { + background-color: #faa64b; + border-color: #faa64b; +} +.checkbox-warning input:checked~span::after { + border-color: #fff; +} +.checkbox-danger input:checked~span::before { + background-color: #f96868; + border-color: #f96868; +} +.checkbox-danger input:checked~span::after { + border-color: #fff; +} +.checkbox-dark input:checked~span::before { + background-color: #465161; + border-color: #465161; +} +.checkbox-dark input:checked~span::after { + border-color: #fff; +} +.checkbox-secondary input:checked~span::before { + background-color: #e4e7ea; + border-color: #e4e7ea; +} +.checkbox-secondary input:checked~span::after { + border-color: #fff; +} +.checkbox-purple input:checked~span::before { + background-color: #926dde; + border-color: #926dde; +} +.checkbox-purple input:checked~span::after { + border-color: #fff; +} +.checkbox-pink input:checked~span::before { + background-color: #f96197; + border-color: #f96197; +} +.checkbox-pink input:checked~span::after { + border-color: #fff; +} +.checkbox-cyan input:checked~span::before { + background-color: #57c7d4; + border-color: #57c7d4; +} +.checkbox-cyan input:checked~span::after { + border-color: #fff; +} +.checkbox-yellow input:checked~span::before { + background-color: #fcc525; + border-color: #fcc525; +} +.checkbox-yellow input:checked~span::after { + border-color: #fff; +} +.checkbox-brown input:checked~span::before { + background-color: #8d6658; + border-color: #8d6658; +} +.checkbox-brown input:checked~span::after { + border-color: #fff; +} +/* radio */ +.lyear-radio span::before { + -webkit-border-radius: 50%; + border-radius: 50%; +} +.lyear-radio span::after { + border: 0; + height: 6px; + left: 6px; + top: 6px; + width: 6px; + background: #4d5259; + -webkit-border-radius: 100%; + border-radius: 100%; +} +.radio-primary input:checked~span::before { + background-color: #33cabb; + border-color: #33cabb; +} +.radio-primary input:checked~span::after { + background-color: #fff; +} +.radio-success input:checked~span::before { + background-color: #15c377; + border-color: #15c377; +} +.radio-success input:checked~span::after { + background-color: #fff; +} +.radio-info input:checked~span::before { + background-color: #48b0f7; + border-color: #48b0f7; +} +.radio-info input:checked~span::after { + background-color: #fff; +} +.radio-warning input:checked~span::before { + background-color: #faa64b; + border-color: #faa64b; +} +.radio-warning input:checked~span::after { + background-color: #fff; +} +.radio-danger input:checked~span::before { + background-color: #f96868; + border-color: #f96868; +} +.radio-danger input:checked~span::after { + background-color: #fff; +} +.radio-dark input:checked~span::before { + background-color: #465161; + border-color: #465161; +} +.radio-dark input:checked~span::after { + background-color: #fff; +} +.radio-secondary input:checked~span::before { + background-color: #e4e7ea; + border-color: #e4e7ea; +} +.radio-secondary input:checked~span::after { + background-color: #fff; +} +.radio-purple input:checked~span::before { + background-color: #926dde; + border-color: #926dde; +} +.radio-purple input:checked~span::after { + background-color: #fff; +} +.radio-pink input:checked~span::before { + background-color: #f96197; + border-color: #f96197; +} +.radio-pink input:checked~span::after { + background-color: #fff; +} +.radio-cyan input:checked~span::before { + background-color: #57c7d4; + border-color: #57c7d4; +} +.radio-cyan input:checked~span::after { + background-color: #fff; +} +.radio-yellow input:checked~span::before { + background-color: #fcc525; + border-color: #fcc525; +} +.radio-yellow input:checked~span::after { + background-color: #fff; +} +.radio-brown input:checked~span::before { + background-color: #8d6658; + border-color: #8d6658; +} +.radio-brown input:checked~span::after { + background-color: #fff; +} + +.checkbox-inline, .radio-inline { + display: inline-block; +} +.form-horizontal .lyear-radio.radio-inline, +.form-horizontal .lyear-checkbox.checkbox-inline { + padding-top: 0px; + margin-top: 8px; +} +.checkbox-inline+.checkbox-inline, +.radio-inline+.radio-inline { + margin-left: 0px; +} + +/* 开关 */ +.lyear-switch { + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + margin-bottom: 0; +} +.lyear-switch input { + height: 0; + width: 0; + position: absolute; + opacity: 0; +} +.lyear-switch span { + display: inline-block; + position: relative; + width: 40px; + height: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + background-color: #ebebeb; + border: 2px solid #ebebeb; + cursor: pointer; + -webkit-transition: all .1s ease; + -o-transition: all .1s ease; + transition: all .1s ease +} +.lyear-switch span:after { + content: ''; + height: 20px; + width: 20px; + -webkit-border-radius: 50%; + border-radius: 50%; + position: absolute; + left: 1px; + top: -7px; + color: #aaa; + -webkit-transition: all .1s ease; + -o-transition: all .1s ease; + transition: all .1s ease; + text-align: center; + font-size: 13px; + background-color: #fff; + -webkit-box-shadow: rgba(0,0,0,.12) 0 1px 6px,rgba(0,0,0,.12) 0 1px 4px; + box-shadow: rgba(0,0,0,.12) 0 1px 6px,rgba(0,0,0,.12) 0 1px 4px +} +.lyear-switch input:checked~span:after { + left: -webkit-calc(100% - 20px); + left: calc(100% - 20px); +} +.switch-primary input:checked~span:after { + background-color: #33cabb +} +.switch-success input:checked~span:after { + background-color: #15c377 +} +.switch-info input:checked~span:after { + background-color: #48b0f7 +} +.switch-warning input:checked~span:after { + background-color: #faa64b +} +.switch-danger input:checked~span:after { + background-color: #f96868 +} +.switch-secondary input:checked~span:after { + background-color: #868e96 +} +.switch-dark input:checked~span:after { + background-color: #465161 +} +.switch-purple input:checked~span:after { + background-color: #926dde +} +.switch-pink input:checked~span:after { + background-color: #f96197 +} +.switch-cyan input:checked~span:after { + background-color: #57c7d4 +} +.switch-yellow input:checked~span:after { + background-color: #fcc525 +} +.switch-brown input:checked~span:after { + background-color: #8d6658 +} + +.lyear-switch.switch-solid span, +.lyear-switch.switch-light span, +.lyear-switch.switch-outline span { + height: 20px; +} +.lyear-switch.switch-solid span:after, +.lyear-switch.switch-light span:after, +.lyear-switch.switch-outline span:after { + top: -2px; +} +.lyear-switch.switch-outline span { + background-color: #fff +} +.switch-solid.switch-primary input:checked~span { + background-color: #33cabb; + border-color: #33cabb +} +.switch-solid.switch-primary input:checked~span:after { + background-color: #fff; + color: #33cabb +} +.switch-solid.switch-success input:checked~span { + background-color: #15c377; + border-color: #15c377 +} +.switch-solid.switch-success input:checked~span:after { + background-color: #fff; + color: #15c377 +} +.switch-solid.switch-info input:checked~span { + background-color: #48b0f7; + border-color: #48b0f7 +} +.switch-solid.switch-info input:checked~span:after { + background-color: #fff; + color: #48b0f7 +} +.switch-solid.switch-warning input:checked~span { + background-color: #faa64b; + border-color: #faa64b +} +.switch-solid.switch-warning input:checked~span:after { + background-color: #fff; + color: #faa64b +} +.switch-solid.switch-danger input:checked~span { + background-color: #f96868; + border-color: #f96868 +} +.switch-solid.switch-danger input:checked~span:after { + background-color: #fff; + color: #f96868 +} +.switch-solid.switch-secondary input:checked~span { + background-color: #868e96; + border-color: #868e96 +} +.switch-solid.switch-secondary input:checked~span:after { + background-color: #fff; + color: #868e96 +} +.switch-solid.switch-dark input:checked~span { + background-color: #465161; + border-color: #465161 +} +.switch-solid.switch-dark input:checked~span:after { + background-color: #fff; + color: #465161 +} +.switch-solid.switch-purple input:checked~span { + background-color: #926dde; + border-color: #926dde +} +.switch-solid.switch-purple input:checked~span:after { + background-color: #fff; + color: #926dde +} +.switch-solid.switch-pink input:checked~span { + background-color: #f96197; + border-color: #f96197 +} +.switch-solid.switch-pink input:checked~span:after { + background-color: #fff; + color: #f96197 +} +.switch-solid.switch-cyan input:checked~span { + background-color: #57c7d4; + border-color: #57c7d4 +} +.switch-solid.switch-cyan input:checked~span:after { + background-color: #fff; + color: #57c7d4 +} +.switch-solid.switch-yellow input:checked~span { + background-color: #fcc525; + border-color: #fcc525 +} +.switch-solid.switch-yellow input:checked~span:after { + background-color: #fff; + color: #fcc525 +} +.switch-solid.switch-brown input:checked~span { + background-color: #8d6658; + border-color: #8d6658 +} +.switch-solid.switch-brown input:checked~span:after { + background-color: #fff; + color: #8d6658 +} + +/* 模态框 */ +.modal-header { + border-bottom-color: #f1f2f3; +} +.modal-footer { + border-top-color: #f1f2f3; +} +.modal-content { + -webkit-border-radius: 3px; + border-radius: 3px; + border: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +/* 标签页 */ +.nav-tabs { + border-bottom-color: #ebebeb; + margin-bottom: 1rem; +} +.nav-tabs > li > a { + margin-right: 0px; + border: none; + border-bottom: 1px solid transparent; + border-radius: 0; + color: #8b95a5; + -webkit-transition: 0.5s; + transition: 0.5s; +} +.nav-tabs > li.active > a, +.nav-tabs > li.active > a:focus, +.nav-tabs > li.active > a:hover { + color: #4d5259; + border: none; + background-color: transparent; + border-bottom: 1px solid #33cabb; +} +.nav-tabs.nav > li > a:hover, +.nav-tabs.nav > li > a:focus { + text-decoration: none; + background-color: transparent; + border-bottom-color: #33cabb; +} +.nav-tabs.nav-justified>.active>a, +.nav-tabs.nav-justified>.active>a:focus, +.nav-tabs.nav-justified>.active>a:hover { + color: #4d5259; + border: none; + border-bottom: 1px solid #33cabb; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified>li>a { + border-bottom-color: #ebebeb; + -webkit-border-radius: 0px; + border-radius: 0px; + } +} + +/* 进度条 */ +.progress { + height: 12px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + margin-bottom: 8px; + background-color: #f5f6f7; + -webkit-box-shadow: none; + box-shadow: none; +} +.progress-bar { + font-size: 10px; + line-height: 12px; + background-color: #33cabb; + -webkit-box-shadow: none; + box-shadow: none; +} +.progress-bar-success { + background-color: #15c377; +} +.progress-bar-info { + background-color: #48b0f7; +} +.progress-bar-warning { + background-color: #faa64b; +} +.progress-bar-danger { + background-color: #f96868; +} +.progress-bar-secondary { + background-color: #e4e7ea; +} +.progress-bar-pink { + background-color: #f96197; +} +.progress-bar-purple { + background-color: #926dde; +} +.progress-bar-brown { + background-color: #8d6658; +} +.progress-bar-cyan { + background-color: #57c7d4; +} +.progress-bar-yellow { + background-color: #fcc525; +} +.progress-bar-gray { + background-color: #868e96; +} +.progress-bar-dark { + background-color: #465161; +} +.progress-sm { + height: 8px; +} +.progress-lg { + height: 16px; +} + +/* 弹出框 */ +.popover { + border-color: #ebebeb; + -webkit-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: none; + box-shadow: none; + padding: 0px; +} +.popover-title { + background-color: #fcfdfe; + padding-top: 10px; + padding-bottom: 10px; + color: #616a78; + border-bottom-color: #f1f2f3; +} +.popover.top>.arrow { + border-top-color: #ebebeb; +} +.popover.right>.arrow { + border-right-color: #ebebeb; +} +.popover.bottom>.arrow { + border-bottom-color: #ebebeb; +} +.popover.left>.arrow { + border-left-color: #ebebeb; +} + +/* 警告框 */ +.alert { + -webkit-border-radius: 2px; + border-radius: 2px; +} +.alert .alert-link:hover { + text-decoration: underline; +} + +/* 分页 */ +.pagination > li > a, +.pagination > li > span { + padding: 0px 8px; + margin: 0 3px; + color: #6c757d; + border-color: #dee2e6; + line-height: 29px; + min-width: 31px; + text-align: center; + -webkit-border-radius: 2px; + border-radius: 2px; +} +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 0; + min-width: 26px; + line-height: 24px; +} +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 0; + min-width: 37px; + line-height: 35px; +} +.pagination > li > a:hover, +.pagination > li > a:focus +.pagination > li > span:hover, +.pagination > li > span:focus { + background-color: #f9fafb; + color: #4d5259; +} +.pagination > li:first-child a, +.pagination > li:first-child span { + -webkit-border-radius: 2px; + border-radius: 2px; +} +.pagination > li:last-child a, +.pagination > li:last-child span { + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; +} +.pagination > .active > a, +.pagination > .active > a:focus, +.pagination > .active > a:hover, +.pagination > .active > span, +.pagination > .active > span:focus, +.pagination > .active > span:hover { + background-color: #33cabb; + border-color: #33cabb; +} +.pagination > .disabled > a, +.pagination > .disabled > a:focus, +.pagination > .disabled > a:hover, +.pagination > .disabled > span, +.pagination > .disabled > span:focus, +.pagination > .disabled > span:hover { + color: #6c757d; + opacity: 0.6; +} +.pagination.no-border > li a, +.pagination.no-border > li span { + border: none; +} +.pagination-circle > li a, +.pagination-circle > li span { + -webkit-border-radius: 50% !important; + border-radius: 50% !important; +} +.pagination.no-gutters > li a, +.pagination.no-gutters > li span { + margin: 0; + margin-left: -1px; + -webkit-border-radius: 0 !important; + border-radius: 0 !important; +} + +.pager li > a, +.pager li > span { + -webkit-border-radius: 2px; + border-radius: 2px; + background-color: #fcfdfe; + border-color: #ebebeb; + color: #8b95a5; +} +.pager li > a:hover, +.pager li > a:focus{ + background-color: #f9fafb; + color: #4d5259 +} +.pager li > a:active, +.pager li > a.active { + background-color: #f9fafb; + color: #4d5259 +} +.pager .disabled > a, +.pager .disabled > a:focus, +.pager .disabled > a:hover, +.pager .disabled > span { + opacity: .6; + background-color: #fcfdfe; +} + +/* 按钮 */ +.btn-w-xs { + width: 80px +} +.btn-w-sm { + width: 100px +} +.btn-w-md { + width: 120px +} +.btn-w-lg { + width: 145px +} +.btn-w-xl { + width: 180px +} +.btn { + color: #8b95a5; + padding: 8px 12px; + letter-spacing: 1px; + border-radius: 2px; + background-color: #fff; + outline: none !important; + -webkit-transition: 0.15s linear; + transition: 0.15s linear +} +.btn:focus, +.btn.focus, +.btn:active, +.btn.active { + -webkit-box-shadow: none !important; + box-shadow: none !important +} +.btn-default { + background-color: #fcfdfe; + border-color: #ebebeb; + color: #8b95a5 +} +.btn-default:hover { + background-color: #f9fafb; + border-color: #ebebeb; + color: #4d5259 +} +.btn-default:focus, +.btn-default.focus, +.btn-default:active, +.btn-default.active, +.show>.btn-default.dropdown-toggle, +.open>.btn-default.dropdown-toggle { + background-color: #f9fafb!important; + border-color: #ebebeb!important; + color: #4d5259 +} +.btn-default:not([disabled]):not(.disabled).active, +.btn-default:not([disabled]):not(.disabled):active, +.show>.btn-default.dropdown-toggle { + background-color: #f9fafb!important; + border-color: #ebebeb!important; + color: #4d5259; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-default.disabled, +.btn-default:disabled { + background-color: #fcfdfe; + border-color: #ebebeb; + opacity: 0.5 +} +.btn-primary { + background-color: #33cabb; + border-color: #33cabb; + color: #fff!important; +} +.btn-primary:hover { + background-color: #52d3c7; + border-color: #52d3c7; +} +.btn-primary:focus, +.btn-primary.focus, +.btn-primary.active, +.btn-primary:active, +.open>.dropdown-toggle.btn-primary { + background-color: #52d3c7!important; + border-color: #52d3c7!important; +} +.btn-primary.disabled, +.btn-primary:disabled { + background-color: #33cabb; + border-color: #33cabb; + opacity: 0.5 +} +.btn-primary:not([disabled]):not(.disabled).active, +.btn-primary:not([disabled]):not(.disabled):active, +.show>.btn-primary.dropdown-toggle { + background-color: #2ba99d!important; + border-color: #2ba99d!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-primary.disabled.focus, +.btn-primary.disabled:focus, +.btn-primary.disabled:hover, +.btn-primary[disabled].focus, +.btn-primary[disabled]:focus, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary.focus, +fieldset[disabled] .btn-primary:focus, +fieldset[disabled] .btn-primary:hover { + background-color: #26BBA8; + border-color: #26BBA8; +} +.btn-success { + background-color: #15c377; + border-color: #15c377; + color: #fff!important; +} +.btn-success:hover { + background-color: #16d17f; + border-color: #16d17f; +} +.btn-success:focus, +.btn-success.focus, +.btn-success.active, +.btn-success:active, +.open>.dropdown-toggle.btn-success { + background-color: #16d17f!important; + border-color: #16d17f!important; +} +.btn-success.disabled,.btn-success:disabled { + background-color: #15c377; + border-color: #15c377; + opacity: 0.5 +} +.btn-success:not([disabled]):not(.disabled).active, +.btn-success:not([disabled]):not(.disabled):active, +.show>.btn-success.dropdown-toggle { + background-color: #14b56f!important; + border-color: #14b56f!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-success.disabled.focus, +.btn-success.disabled:focus, +.btn-success.disabled:hover, +.btn-success[disabled].focus, +.btn-success[disabled]:focus, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success.focus, +fieldset[disabled] .btn-success:focus, +fieldset[disabled] .btn-success:hover { + background-color: #0FB25F; + border-color: #0FB25F; +} +.btn-info { + background-color: #48b0f7; + border-color: #48b0f7; + color: #fff!important; +} +.btn-info:hover { + background-color: #65bdf8; + border-color: #65bdf8; +} +.btn-info:focus, +.btn-info.focus, +.btn-info.active, +.btn-info:active, +.open>.dropdown-toggle.btn-info { + background-color: #65bdf8!important; + border-color: #65bdf8!important; +} +.btn-info.disabled, +.btn-info:disabled { + background-color: #48b0f7; + border-color: #48b0f7; + opacity: 0.5 +} +.btn-info:not([disabled]):not(.disabled).active, +.btn-info:not([disabled]):not(.disabled):active, +.show>.btn-info.dropdown-toggle { + background-color: #2ba3f6!important; + border-color: #2ba3f6!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-info.disabled.focus, +.btn-info.disabled:focus, +.btn-info.disabled:hover, +.btn-info[disabled].focus, +.btn-info[disabled]:focus, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info.focus, +fieldset[disabled] .btn-info:focus, +fieldset[disabled] .btn-info:hover { + background-color: #379BF5; + border-color: #379BF5; +} +.btn-warning { + background-color: #faa64b; + border-color: #faa64b; + color: #fff!important; +} +.btn-warning:hover { + background-color: #fbb264; + border-color: #fbb264; +} +.btn-warning:focus, +.btn-warning.focus, +.btn-warning.active, +.btn-warning:active, +.open>.dropdown-toggle.btn-warning { + background-color: #fbb264!important; + border-color: #fbb264!important; +} +.btn-warning.disabled,.btn-warning:disabled { + background-color: #faa64b; + border-color: #faa64b; + opacity: 0.5 +} +.btn-warning:not([disabled]):not(.disabled).active, +.btn-warning:not([disabled]):not(.disabled):active, +.show>.btn-warning.dropdown-toggle { + background-color: #f99a32!important; + border-color: #f99a32!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-warning.disabled.focus, +.btn-warning.disabled:focus, +.btn-warning.disabled:hover, +.btn-warning[disabled].focus, +.btn-warning[disabled]:focus, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning.focus, +fieldset[disabled] .btn-warning:focus, +fieldset[disabled] .btn-warning:hover { + background-color: #F89038; + border-color: #F89038; +} +.btn-danger { + background-color: #f96868; + border-color: #f96868; + color: #fff!important; +} +.btn-danger:hover { + background-color: #fa8181; + border-color: #fa8181; +} +.btn-danger:focus, +.btn-danger.focus, +.btn-danger.active, +.btn-danger:active, +.open>.dropdown-toggle.btn-danger { + background-color: #fa8181!important; + border-color: #fa8181!important; +} +.btn-danger.disabled, +.btn-danger:disabled { + background-color: #f96868; + border-color: #f96868; + opacity: 0.5 +} +.btn-danger:not([disabled]):not(.disabled).active, +.btn-danger:not([disabled]):not(.disabled):active, +.show>.btn-danger.dropdown-toggle { + background-color: #f84f4f!important; + border-color: #f84f4f!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-danger.disabled.focus, +.btn-danger.disabled:focus, +.btn-danger.disabled:hover, +.btn-danger[disabled].focus, +.btn-danger[disabled]:focus, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger.focus, +fieldset[disabled] .btn-danger:focus, +fieldset[disabled] .btn-danger:hover { + background-color: #F75252; + border-color: #F75252; +} +.btn-secondary { + color: #4d5259 !important; + background-color: #e4e7ea; + border-color: #e4e7ea; +} +.btn-secondary:hover { + background-color: #edeff1; + border-color: #edeff1; +} +.btn-secondary:focus, +.btn-secondary.focus, +.btn-secondary.active, +.btn-secondary:active, +.open>.dropdown-toggle.btn-secondary { + background-color: #edeff1!important; + border-color: #edeff1!important; +} +.btn-secondary.disabled, +.btn-secondary:disabled { + background-color: #e4e7ea; + border-color: #e4e7ea; + opacity: 0.5 +} +.btn-secondary:not([disabled]):not(.disabled).active, +.btn-secondary:not([disabled]):not(.disabled):active, +.show>.btn-secondary.dropdown-toggle { + background-color: #dbdfe3!important; + border-color: #dbdfe3!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-secondary.disabled.focus, +.btn-secondary.disabled:focus, +.btn-secondary.disabled:hover, +.btn-secondary[disabled].focus, +.btn-secondary[disabled]:focus, +.btn-secondary[disabled]:hover, +fieldset[disabled] .btn-secondary.focus, +fieldset[disabled] .btn-secondary:focus, +fieldset[disabled] .btn-secondary:hover { + background-color: #DBDFE3; + border-color: #DBDFE3; +} +.btn-link { + color: #48b0f7; + background-color: transparent; + border-color: transparent; +} +.btn-link:hover, +.btn-link:focus { + text-decoration: none; + color: #e4e7ea +} +.btn-purple { + background-color: #926dde; + border-color: #926dde; + color: #fff!important; +} +.btn-purple:hover { + background-color: #a282e3; + border-color: #a282e3; +} +.btn-purple:focus, +.btn-purple.focus, +.btn-purple.active, +.btn-purple:active, +.open>.dropdown-toggle.btn-purple { + background-color: #a282e3!important; + border-color: #a282e3!important; +} +.btn-purple.disabled, +.btn-purple:disabled { + background-color: #926dde; + border-color: #926dde; + opacity: 0.5 +} +.btn-purple:not([disabled]):not(.disabled).active, +.btn-purple:not([disabled]):not(.disabled):active, +.show>.btn-purple.dropdown-toggle { + background-color: #8258d9!important; + border-color: #8258d9!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-purple.disabled.focus, +.btn-purple.disabled:focus, +.btn-purple.disabled:hover, +.btn-purple[disabled].focus, +.btn-purple[disabled]:focus, +.btn-purple[disabled]:hover, +fieldset[disabled] .btn-purple.focus, +fieldset[disabled] .btn-purple:focus, +fieldset[disabled] .btn-purple:hover { + background-color: #7A56D4; + border-color: #7A56D4; +} +.btn-pink { + background-color: #f96197; + border-color: #f96197; + color: #fff!important; +} +.btn-pink:hover { + background-color: #fa75a4; + border-color: #fa75a4; +} +.btn-pink:focus, +.btn-pink.focus, +.btn-pink.active, +.btn-pink:active, +.open>.dropdown-toggle.btn-pink { + background-color: #fa75a4!important; + border-color: #fa75a4!important; +} +.btn-pink.disabled, +.btn-pink:disabled { + background-color: #f96197; + border-color: #f96197; + opacity: 0.5 +} +.btn-pink:not([disabled]):not(.disabled).active, +.btn-pink:not([disabled]):not(.disabled):active, +.show>.btn-pink.dropdown-toggle { + background-color: #f84d8a!important; + border-color: #f84d8a!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-pink.disabled.focus, +.btn-pink.disabled:focus, +.btn-pink.disabled:hover, +.btn-pink[disabled].focus, +.btn-pink[disabled]:focus, +.btn-pink[disabled]:hover, +fieldset[disabled] .btn-pink.focus, +fieldset[disabled] .btn-pink:focus, +fieldset[disabled] .btn-pink:hover { + background-color: #F74B80; + border-color: #F74B80; +} +.btn-cyan { + background-color: #57c7d4; + border-color: #57c7d4; + color: #fff!important; +} +.btn-cyan:hover { + background-color: #77d2dc; + border-color: #77d2dc; +} +.btn-cyan:focus, +.btn-cyan.focus, +.btn-cyan.active, +.btn-cyan:active, +.open>.dropdown-toggle.btn-cyan { + background-color: #77d2dc!important; + border-color: #77d2dc!important; +} +.btn-cyan.disabled, +.btn-cyan:disabled { + background-color: #57c7d4; + border-color: #57c7d4; + opacity: 0.5 +} +.btn-cyan:not([disabled]):not(.disabled).active, +.btn-cyan:not([disabled]):not(.disabled):active, +.show>.btn-cyan.dropdown-toggle { + background-color: #37bccc!important; + border-color: #37bccc!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-cyan.disabled.focus, +.btn-cyan.disabled:focus, +.btn-cyan.disabled:hover, +.btn-cyan[disabled].focus, +.btn-cyan[disabled]:focus, +.btn-cyan[disabled]:hover, +fieldset[disabled] .btn-cyan.focus, +fieldset[disabled] .btn-cyan:focus, +fieldset[disabled] .btn-cyan:hover { + background-color: #42B7C7; + border-color: #42B7C7; +} +.btn-yellow { + background-color: #fcc525; + border-color: #fcc525; + color: #fff!important; +} +.btn-yellow:hover { + background-color: #fdd04d; + border-color: #fdd04d; +} +.btn-yellow:focus, +.btn-yellow.focus, +.btn-yellow.active, +.btn-yellow:active, +.open>.dropdown-toggle.btn-yellow { + background-color: #fdd04d!important; + border-color: #fdd04d!important; +} +.btn-yellow.disabled, +.btn-yellow:disabled { + background-color: #fcc525; + border-color: #fcc525; + opacity: 0.5 +} +.btn-yellow:not([disabled]):not(.disabled).active, +.btn-yellow:not([disabled]):not(.disabled):active, +.show>.btn-yellow.dropdown-toggle { + background-color: #f5b703!important; + border-color: #f5b703!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-yellow.disabled.focus, +.btn-yellow.disabled:focus, +.btn-yellow.disabled:hover, +.btn-yellow[disabled].focus, +.btn-yellow[disabled]:focus, +.btn-yellow[disabled]:hover, +fieldset[disabled] .btn-yellow.focus, +fieldset[disabled] .btn-yellow:focus, +fieldset[disabled] .btn-yellow:hover { + background-color: #FCB41B; + border-color: #FCB41B; +} +.btn-brown { + background-color: #8d6658; + border-color: #8d6658; + color: #fff!important; +} +.btn-brown:hover { + background-color: #9d7162; + border-color: #9d7162; +} +.btn-brown:focus, +.btn-brown.focus, +.btn-brown.active, +.btn-brown:active, +.open>.dropdown-toggle.btn-brown { + background-color: #8d6658!important; + border-color: #8d6658!important; +} +.btn-brown.disabled, +.btn-brown:disabled { + background-color: #8d6658; + border-color: #8d6658; + opacity: 0.5 +} +.btn-brown:not([disabled]):not(.disabled).active, +.btn-brown:not([disabled]):not(.disabled):active, +.show>.btn-brown.dropdown-toggle { + background-color: #7d5b4e!important; + border-color: #7d5b4e!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-brown.disabled.focus, +.btn-brown.disabled:focus, +.btn-brown.disabled:hover, +.btn-brown[disabled].focus, +.btn-brown[disabled]:focus, +.btn-brown[disabled]:hover, +fieldset[disabled] .btn-brown.focus, +fieldset[disabled] .btn-brown:focus, +fieldset[disabled] .btn-brown:hover { + background-color: #755043; + border-color: #755043; +} +.btn-dark { + background-color: #465161; + border-color: #465161; + color: #fff!important; +} +.btn-dark:hover { + background-color: #515d70; + border-color: #515d70; +} +.btn-dark:focus, +.btn-dark.focus, +.btn-dark.active, +.btn-dark:active, +.open>.dropdown-toggle.btn-dark { + background-color: #515d70!important; + border-color: #515d70!important; +} +.btn-dark.disabled, +.btn-dark:disabled { + background-color: #465161; + border-color: #465161; + opacity: 0.5 +} +.btn-dark:not([disabled]):not(.disabled).active, +.btn-dark:not([disabled]):not(.disabled):active, +.show>.btn-dark.dropdown-toggle { + background-color: #3b4552!important; + border-color: #3b4552!important; + -webkit-box-shadow: none; + box-shadow: none +} +.btn-dark.disabled.focus, +.btn-dark.disabled:focus, +.btn-dark.disabled:hover, +.btn-dark[disabled].focus, +.btn-dark[disabled]:focus, +.btn-dark[disabled]:hover, +fieldset[disabled] .btn-dark.focus, +fieldset[disabled] .btn-dark:focus, +fieldset[disabled] .btn-dark:hover { + background-color: #353E4B; + border-color: #353E4B; +} +.btn-round { + -webkit-border-radius: 10rem; +} +.btn-label { + position: relative; + padding-left: 52px; + overflow: hidden; +} +.btn-label label { + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: 36px; + line-height: 1.5; + padding-top: 5px; + padding-bottom: 5px; + background-color: rgba(0,0,0,0.1); + cursor: pointer; + margin-bottom: 0; +} +.btn-label label i { + font-size: 16px; +} +.btn-group-xs>.btn, +.btn-xs { + font-size: 12px; + padding: 2px 6px; + line-height: 18px +} +.btn-group-sm>.btn, +.btn-sm { + font-size: 12px; + padding: 4px 8px; + line-height: 20px +} +.btn-group-lg>.btn, +.btn-lg { + font-size: 16px; + padding: 7px 20px; + line-height: 32px +} +.btn-sm.btn-label { + padding-left: 42px; +} +.btn-sm.btn-label label { + line-height: 20px; + width: 30px; +} +.btn-lg.btn-label { + padding-left: 58px; +} +.btn-lg.btn-label label { + line-height: 36px; + width: 36px; +} +.btn-xs.btn-label { + padding-left: 36px; +} +.btn-xs.btn-label label { + line-height: 14px; + width: 28px; +} +.btn-group-justified { + display: -webkit-box; + display: flex; + -webkit-box-pack: justify; + justify-content: space-between; +} +.btn-group-justified .btn, +.btn-group-justified .btn-group { + width: 100%; +} +.btn-group-round .btn:first-child { + border-top-left-radius: 10rem; + border-bottom-left-radius: 10rem; +} +.btn-group-round .btn:last-child { + border-top-right-radius: 10rem; + border-bottom-right-radius: 10rem; +} + +/* 背景色 */ +.bg-primary { + background-color: #33cabb !important; + color: #fff!important; +} +.bg-secondary { + background-color: #e4e7ea !important; + color: #fff!important; +} +.bg-success { + background-color: #15c377 !important; + color: #fff!important; +} +.bg-info { + background-color: #48b0f7 !important; + color: #fff!important; +} +.bg-warning { + background-color: #faa64b !important; + color: #fff!important; +} +.bg-danger { + background-color: #f96868 !important; + color: #fff!important; +} +.bg-pink { + background-color: #f96197 !important; + color: #fff!important; +} +.bg-purple { + background-color: #926dde !important; + color: #fff!important; +} +.bg-brown { + background-color: #8d6658 !important; + color: #fff!important; +} +.bg-cyan { + background-color: #57c7d4 !important; + color: #fff!important; +} +.bg-yellow { + background-color: #fcc525 !important; + color: #fff!important; +} +.bg-gray { + background-color: #868e96 !important; + color: #fff!important; +} +.bg-dark { + background-color: #465161 !important; + color: #fff!important; +} +.bg-white { + background-color: #fff !important +} +.bg-lightest { + background-color: #fcfdfe !important +} +.bg-lighter { + background-color: #f9fafb !important +} +.bg-light { + background-color: #f5f6f7 !important +} +.bg-translucent { + background-color: rgba(255, 255, 255, 0.175) +} +.bg-transparent { + background-color: transparent !important +} + +/* 字体颜色 */ +.text-primary { + color: #33cabb !important +} +.text-secondary { + color: #e4e7ea !important +} +.text-success { + color: #15c377 !important +} +.text-info { + color: #48b0f7 !important +} +.text-warning { + color: #faa64b !important +} +.text-danger { + color: #f96868 !important +} +.text-pink { + color: #f96197 !important +} +.text-purple { + color: #926dde !important +} +.text-brown { + color: #8d6658 !important +} +.text-cyan { + color: #57c7d4 !important +} +.text-yellow { + color: #fcc525 !important +} +.text-gray { + color: #868e96 !important +} +.text-dark { + color: #465161 !important +} +.text-default { + color: #4d5259 !important +} +.text-muted { + color: #868e96 !important +} +.text-light { + color: #616a78 !important +} +.text-lighter { + color: #a5b3c7 !important +} +.text-fade { + color: rgba(77,82,89,0.7) !important +} +.text-fader { + color: rgba(77,82,89,0.5) !important +} +.text-fadest { + color: rgba(77,82,89,0.4) !important +} +.text-white-50 { + color: rgba(255, 255, 255, 0.5) !important +} +.text-white { + color: #ffffff!important +} +.text-transparent { + color: transparent !important +} +a.text-primary:hover,a.text-primary:focus { + color: #33cabb !important +} +a.text-secondary:hover,a.text-secondary:focus { + color: #e4e7ea !important +} +a.text-info:hover,a.text-info:focus { + color: #48b0f7 !important +} +a.text-success:hover,a.text-success:focus { + color: #15c377 !important +} +a.text-warning:hover,a.text-warning:focus { + color: #faa64b !important +} +a.text-danger:hover,a.text-danger:focus { + color: #f96868 !important +} + +/* 分割线 */ +.divider { + display: -webkit-box; + display: flex; + -webkit-box-align: center; + align-items: center; + -webkit-box-flex: 0; + flex: 0 1; + color: #8b95a5; + font-size: 11px; + letter-spacing: .5px; + margin: 2rem auto; + width: 100%; +} +.divider::before, +.divider::after { + content: ''; + -webkit-box-flex: 1; + flex-grow: 1; + border-top: 1px solid #ebebeb; +} +.divider::before { + margin-right: 16px; +} +.divider::after { + margin-left: 16px; +} + +/* 其他 */ +.media img { + max-width: inherit; +} +hr { + border-top-color: rgba(77,82,89,0.05); + margin: 2rem auto; +} +dd, dt { + line-height: 1.75; +} +.lead { + font-size: 16px; + line-height: 1.75; +} +.irs { + font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; +} + +/** ---------------------------------- + * 辅助类 + -------------------------------------- */ +/* margin */ +.m-0 { + margin: 0px!important; +} +.m-t-0 { + margin-top: 0px!important; +} +.m-b-0 { + margin-bottom: 0px!important; +} +.m-5 { + margin: 5px!important; +} +.m-t-5 { + margin-top: 5px!important; +} +.m-r-5 { + margin-right: 5px!important; +} +.m-b-5 { + margin-bottom: 5px!important; +} +.m-l-5 { + margin-left: 5px!important; +} +.m-10 { + margin: 10px!important; +} +.m-tb-10 { + margin: 10px 0px!important; +} +.m-lr-10 { + margin: 0px 10px!important; +} +.m-t-10 { + margin-top: 10px!important; +} +.m-r-10 { + margin-right: 10px!important; +} +.m-b-10 { + margin-bottom: 10px!important; +} +.m-l-10 { + margin-left: 10px!important; +} +.m-15 { + margin: 15px!important; +} +.m-tb-15 { + margin: 15px 0px!important; +} +.m-lr-15 { + margin: 0px 15px!important; +} +.m-t-15 { + margin-top: 15px!important; +} +.m-r-15 { + margin-right: 15px!important; +} +.m-b-15 { + margin-bottom: 15px!important; +} +.m-l-15 { + margin-left: 15px!important; +} + +/* padding */ +.p-0 { + padding: 0px!important; +} +.p-t-0 { + padding-top: 0px!important; +} +.p-b-0 { + padding-bottom: 0px!important; +} +.p-10 { + padding: 10px!important; +} +.p-tb-10 { + padding: 10px 0px!important; +} +.p-lr-10 { + padding: 0px 10px!important; +} +.p-t-10 { + padding-top: 10px!important; +} +.p-r-10 { + padding-right: 10px!important; +} +.p-b-10 { + padding-bottom: 10px!important; +} +.p-l-10 { + padding-left: 10px!important; +} +.p-15 { + padding: 15px!important; +} +.p-tb-15 { + padding: 15px 0px!important; +} +.p-lr-15 { + padding: 0px 15px!important; +} +.p-t-15 { + padding-top: 15px!important; +} +.p-r-15 { + padding-right: 15px!important; +} +.p-b-15 { + padding-bottom: 15px!important; +} +.p-l-15 { + padding-left: 15px!important; +} +.p-l-20 { + padding-left: 20px!important; +} +.p-l-40 { + padding-left: 40px!important; +} + +/* 字体大小 */ +.fa-1-5x { + font-size: 1.5em; +} +.fa-2x { + font-size: 2em; +} +.fa-3x { + font-size: 3em; +} +.fa-4x { + font-size: 4em; +} +.fa-5x { + font-size: 5em; +} +.fa-6x { + font-size: 6em; +} +.fa-7x { + font-size: 7em; +} +.fa-8x { + font-size: 8em; +} +.fa-9x { + font-size: 9em; +} +.fa-10x { + font-size: 10em; +} + +/* 宽度 */ +.w-5 { + width: 5%; +} +.w-10 { + width: 10%; +} +.w-15 { + width: 15%; +} +.w-20 { + width: 20%; +} +.w-25 { + width: 25%; +} +.w-30 { + width: 30%; +} +.w-35 { + width: 35%; +} +.w-40 { + width: 40%; +} +.w-45 { + width: 45%; +} +.w-50 { + width: 50%; +} +.w-55 { + width: 55%; +} +.w-60 { + width: 60%; +} +.w-65 { + width: 65%; +} +.w-70 { + width: 70%; +} +.w-75 { + width: 75%; +} +.w-80 { + width: 80%; +} +.w-85 { + width: 85%; +} +.w-90 { + width: 90%; +} +.w-95 { + width: 95%; +} +.w-100 { + width: 100%; +} + +/* 边框 */ +.no-border-tb { + border-top: 0px; + border-bottom: 0px +} +.no-border-lr { + border-left: 0px; + border-right: 0px; +} + +/* 圆点 */ +.badge-dot { + min-width: inherit; + padding: 0px; + width: 8px; + height: 8px; + -webkit-border-radius: 100%; + border-radius: 100%; +} +.badge-dot:empty { + display: inline-block; +} +.badge-dot-sm { + width: 6px; + height: 6px; +} +.badge-dot-lg { + width: 10px; + height: 10px; +} +.badge-dot-xl { + width: 12px; + height: 12px; +} + +/* 其他辅助类 */ +.d-none { + display: none !important; +} +.d-inline { + display: inline !important; +} +.d-inline-block { + display: inline-block !important; +} +.d-block { + display: block !important; +} +.d-table { + display: table !important; +} +.d-table-row { + display: table-row !important; +} +.d-table-cell { + display: table-cell !important; +} +.position-static { + position: static !important; +} +.position-relative { + position: relative !important; +} +.position-absolute { + position: absolute !important; +} +.position-fixed { + position: fixed !important; +} + +/* 图库 */ +.masonry-grid { + -webkit-column-count: 3; + -moz-column-count: 3; + column-count: 3; + -webkit-column-gap: 30px; + -moz-column-gap: 30px; + column-gap: 30px; +} +.masonry-item { + display: block; + -webkit-column-break-inside: avoid; + break-inside: avoid; + padding-bottom: 30px; +} +.masonry-grid { + -webkit-column-gap: 16px; + -moz-column-gap: 16px; + column-gap: 16px; +} +.masonry-grid .masonry-item { + padding-bottom: 16px; +} + +/** ---------------------------------- + * 滚动条样式 + -------------------------------------- */ +.ps { + overflow: hidden !important; + overflow-anchor: none; + -ms-overflow-style: none; + touch-action: auto; + -ms-touch-action: auto; +} +.ps__rail-x { + display: none; + opacity: 0; + transition: background-color .2s linear, opacity .2s linear; + -webkit-transition: background-color .2s linear, opacity .2s linear; + height: 6px; + bottom: 2px; + position: absolute; +} + +.ps__rail-y { + display: none; + opacity: 0; + transition: background-color .2s linear, opacity .2s linear; + -webkit-transition: background-color .2s linear, opacity .2s linear; + width: 6px; + right: 2px; + position: absolute; +} +.ps--active-x > .ps__rail-x, +.ps--active-y > .ps__rail-y { + display: block; + background-color: transparent; +} +.ps:hover > .ps__rail-x, +.ps:hover > .ps__rail-y, +.ps--focus > .ps__rail-x, +.ps--focus > .ps__rail-y, +.ps--scrolling-x > .ps__rail-x, +.ps--scrolling-y > .ps__rail-y { + opacity: 0.6; +} +.ps .ps__rail-x:hover, +.ps .ps__rail-y:hover, +.ps .ps__rail-x:focus, +.ps .ps__rail-y:focus, +.ps .ps__rail-x.ps--clicking, +.ps .ps__rail-y.ps--clicking { + background-color: #eee; + opacity: 0.9; +} +.ps__thumb-x { + background-color: #aaa; + border-radius: 6px; + transition: background-color .2s linear, height .2s ease-in-out; + -webkit-transition: background-color .2s linear, height .2s ease-in-out; + height: 3px; + bottom: 0px; + position: absolute; +} +.ps__thumb-y { + background-color: #aaa; + border-radius: 6px; + transition: background-color .2s linear, width .2s ease-in-out; + -webkit-transition: background-color .2s linear, width .2s ease-in-out; + width: 3px; + right: 0px; + position: absolute; +} +.ps__rail-x:hover > .ps__thumb-x, +.ps__rail-x:focus > .ps__thumb-x, +.ps__rail-x.ps--clicking .ps__thumb-x { + background-color: #999; + height: 6px; +} +.ps__rail-y:hover > .ps__thumb-y, +.ps__rail-y:focus > .ps__thumb-y, +.ps__rail-y.ps--clicking .ps__thumb-y { + background-color: #999; + width: 6px; +} +@supports (-ms-overflow-style: none) { + .ps { + overflow: auto !important; + } +} +@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + .ps { + overflow: auto !important; + } +} + +/** ---------------------------------- + * 左侧导航 + -------------------------------------- */ +.lyear-layout-sidebar { + position: fixed; + top: 0; + bottom: 0; + z-index: 5; + display: block; + width: 240px; + font-weight: 500; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transition: 0.3s transform; + transition: 0.3s transform; + transform: translateX(0); + -webkit-box-shadow: 0px 0px 5px rgba(0,0,0,0.08); + -moz-box-shadow: 0px 0px 5px rgba(0,0,0,0.08); + box-shadow: 0px 0px 5px rgba(0,0,0,0.08); +} +.lyear-layout-sidebar-close .lyear-layout-sidebar { + transform: translateX(-100%); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.lyear-layout-sidebar-close .lyear-layout-header, +.lyear-layout-sidebar-close .lyear-layout-content { + padding-left: 0px; +} +.lyear-layout-sidebar-scroll { + height: -moz-calc(100% - 68px); + height: -webkit-calc(100% - 68px); + height: calc(100% - 68px); + position: relative; + background-color: #fff; +} + +/* 侧边栏开关 */ +.lyear-aside-toggler { + margin-right: .25rem; + padding: .25rem .95rem .25rem .25rem; + line-height: 1.5; + cursor: pointer; +} +.lyear-aside-toggler .lyear-toggler-bar { + display: block; + height: 2px; + width: 20px; + background-color: #4d5259; + margin: 4px 0px; + -webkit-transition: 0.3s; + transition: 0.3s; +} +.lyear-aside-toggler .lyear-toggler-bar:nth-child(2) { + width: 15px; +} +.lyear-aside-toggler:hover .lyear-toggler-bar:nth-child(2) { + width: 20px; +} +.lyear-layout-sidebar-close .lyear-aside-toggler .lyear-toggler-bar { + width: 20px; +} + +/* logo */ +.sidebar-header { + position: relative; + overflow: hidden; + z-index: 999; + background-color: #fff; + width: 100%; + -webkit-box-shadow: 0 1px 1px -1px rgba(77,82,89,0.15); + box-shadow: 0 1px 1px -1px rgba(77,82,89,0.15); +} +.sidebar-header:before, .sidebar-header:after { + content: " "; + display: table; +} +.sidebar-header a { + display: block; + height: auto; + width: 100%; + text-align: center; +} +.sidebar-header a img { + max-width: 240px; + margin: 16px 0px; +} +.sidebar-main { + -webkit-transform: translateZ(0); + transform: translateZ(0); +} +.nav-drawer li a { + padding-right: 24px; + padding-left: 52.99999px; + color: inherit; + font-weight: 500; +} +.nav-drawer > li > a { + border-right: 3px solid transparent; + padding-top: 14px; + padding-bottom: 13px; +} +.nav-drawer > .active > a { + background-color: rgba(0,0,0,.0125); + border-color: #33cabb; +} +.nav-drawer > li.active > a { + background-color: rgba(0,0,0,.0125)!important; +} +.nav-drawer > .active > a:hover, +.nav-drawer > .active > a:focus, +.nav-drawer > .active > a:active { + background-color: rgba(0,0,0,.0125); + border-color: #33cabb; +} +.nav-drawer .nav-subnav > li.active > a, +.nav-drawer .nav-subnav > li > a:hover { + color: #33cabb; + background-color: transparent; +} +.nav-drawer > li > a > i { + position: absolute; + left: 21px; + top: 11px; + font-size: 1.25em; +} +.nav-drawer ul li ul { + padding-left: 15px; +} +.nav-item-has-subnav > a:after { + position: absolute; + right: 24px; + font-family: 'Material Design Icons'; + font-size: 10px; + line-height: 1.75; + content: '\f142'; + -webkit-transition: -webkit-transform 0.3s linear; + transition: -webkit-transform 0.3s linear; + transition: transform 0.3s linear; + transition: transform 0.3s linear, -webkit-transform 0.3s linear; +} +.nav-item-has-subnav.open > a:after { + -webkit-transform: rotate(90deg); + transform: rotate(90deg); +} +.nav-item-has-subnav.open > .nav-subnav { + display: block; +} +.nav-subnav { + display: none; + margin-top: 8px; + margin-bottom: 8px; +} + +/* 左侧版权信息 */ +.sidebar-footer { + bottom: 0; + width: 100%; + height: 96px; + border-top: 1px solid rgba(77,82,89,0.05); + margin-top: 24px; + padding-top: 24px; + padding-right: 24px; + padding-bottom: 24px; + padding-left: 24px; + font-size: 13px; + line-height: 24px; +} + +/** ---------------------------------- + * 头部信息 + -------------------------------------- */ +.lyear-layout-header { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 4; + padding-left: 240px; + background-color: #fff; + -webkit-transition: padding 0.3s; + transition: padding 0.3s; + -webkit-box-shadow: 4px 0 5px rgba(0, 0, 0, 0.035); + -moz-box-shadow: 4px 0 5px rgba(0, 0, 0, 0.035); + box-shadow: 4px 0 5px rgba(0, 0, 0, 0.035); +} +.lyear-layout-header .navbar { + position: relative; + min-height: 64px; + margin-bottom: 0; + border: 0px; + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; +} +.lyear-layout-header .navbar-default { + background-color: transparent; +} +.topbar { + display: -webkit-box; + display: flex; + -webkit-box-pack: justify; + justify-content: space-between; + -webkit-box-align: center; + align-items: center; + min-height: 64px; + padding: 0 15px; +} +.topbar .topbar-left { + display: -webkit-box; + display: flex; + -webkit-box-align: center; + align-items: center; +} +.topbar .topbar-right { + display: -webkit-box; + display: flex; + -webkit-box-align: center; + align-items: center; + -webkit-box-orient: horizontal; + -webkit-box-direction: reverse; + flex-direction: row-reverse; + list-style: none; + margin: 0px; + padding: 0px; +} +.topbar-right > li > a { + position: relative; + display: block; + padding: 10px 0px 10px 15px; +} +.navbar-page-title { + display: inline-block; + margin-right: 20px; + padding-top: 20px; + padding-bottom: 20px; + font-size: 16px; +} + +/* 头像相关 */ +.img-avatar { + display: inline-block !important; + width: 64px; + height: 64px; + line-height: 64px; + text-align: center; + vertical-align: middle; + -webkit-border-radius: 50%; + border-radius: 50%; +} +.img-avatar-48 { + width: 48px; + height: 48px; + line-height: 48px; +} +.edit-avatar { + display: -ms-flexbox; + display: flex; + -ms-flex-align: start; + align-items: flex-start; +} +.avatar-divider { + display: inline-block; + border-left: 1px solid rgba(77,82,89,0.07); + height: 50px; + align-self: center; + margin: 0px 20px; +} +.edit-avatar-content { + display: inline-block; +} + + +/** ---------------------------------- + * 主要内容 + -------------------------------------- */ +.lyear-layout-content { + height: 100%; + width: 100%; + padding-top: 68px; + padding-left: 240px; + -webkit-transition: padding 0.3s; + transition: padding 0.3s; +} +.lyear-layout-content .container-fluid { + padding-top: 15px; + padding-bottom: 15px; +} + +/* card */ +.card { + margin-bottom: 24px; + background-color: #fff; + -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.035); + box-shadow: 0 2px 3px rgba(0, 0, 0, 0.035); +} +.card-header { + width: 100%; + margin: 0; + padding: 15px 24px; + border-bottom: 1px solid rgba(77,82,89,0.05); +} +.card-header > * { + margin: 0; + display: table-cell; + vertical-align: middle; +} +.card-header:after, +.card-footer:after { + display: table; + content: " "; + clear: both; +} +.card-body { + padding: 24px 24px; +} +.card-header .h4, +.card-header h4 { + font-size: 16px; + float: left; +} +.card-header + .card-body { + padding-top: 15px; +} +.card-header[class*='bg'] .card-actions > li > a:not(.label), +.card-header[class*='bg'] .card-actions > li > button, +.card-header[class*='bg'] h1, +.card-header[class*='bg'] h2, +.card-header[class*='bg'] h3, +.card-header[class*='bg'] h4, +.card-header[class*='bg'] h5, +.card-header[class*='bg'] h6, +.card-header[class*='bg'] .h1, +.card-header[class*='bg'] .h2, +.card-header[class*='bg'] .h3, +.card-header[class*='bg'] .h4, +.card-header[class*='bg'] .h5, +.card-header[class*='bg'] .h6 { + color: #ffffff; +} +.card-toolbar { + padding: 24px 24px 0px 24px; + position: relative; +} +.card-toolbar .search-bar { + max-width: 280px; +} +.card-toolbar .dropdown-menu { + min-width: 100%; +} +/* card-actions */ +.card-actions { + float: right; + margin-bottom: 0; + margin-left: auto; + padding: 0; +} +.card-actions > li { + display: inline-block; + padding: 0; +} +.card-actions > li > a:not(.label), +.card-actions > li > button { + color: #86939e; + display: inline-block; + padding: 0; + line-height: 1; + opacity: .7; + vertical-align: middle; + -webkit-transition: opacity 0.15s ease-out; + transition: opacity 0.15s ease-out; +} +.card-actions > li > a:not(.label):hover, +.card-actions > li > button:hover { + text-decoration: none; + opacity: 1; +} +.card-actions > li > a:not(.label):active, +.card-actions > li > button:active { + opacity: .6; +} +.card-actions > li > span { + display: block; +} +.card-actions > li > .label { + line-height: 1.25; +} +.card-actions > li > a:focus { + text-decoration: none; + opacity: 1; +} +.card-actions > li > button { + background: none; + border: none; +} +.card-actions > li.active > a, +.card-actions > li.open > button { + text-decoration: none; + opacity: 1; +} +.card-actions > li + li { + margin-left: 10px; +} +.card .tab-content { + padding: 10px 24px; +} +.card-footer { + background-color: #fcfdfe; + border-top: 1px solid rgba(77,82,89,0.05); + padding: 15px 24px; +} +/* page-tabs */ +.page-tabs.nav-tabs { + padding: 0px 10px; +} +.page-tabs.nav-tabs > li > a { + padding: 15px; +} + +/* 加载动画 */ +#lyear-loading { + position: fixed; + width: 100%; + height: 100%; + z-index: 9990; + background: rgba(0, 0, 0, 0.0325) +} +#lyear-loading .spinner-border { + z-index: 999999; + position: fixed; + left: 50%; + top: 50% +} +@-webkit-keyframes spinner-border { + to { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes spinner-border { + to { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +.spinner-border { + display: inline-block; + width: 3rem; + height: 3rem; + vertical-align: text-bottom; + border: 0.125em solid currentColor; + border-right-color: transparent; + border-radius: 50%; + -webkit-animation: spinner-border .75s linear infinite; + animation: spinner-border .75s linear infinite; +} + +/* 步骤条 */ +.nav-step { + display: -webkit-box; + display: flex; + -webkit-box-pack: justify; + justify-content: space-between; + -webkit-box-align: baseline; + align-items: baseline; + padding: 0px; + margin-bottom: 1rem; +} +.step-dots .nav-step-item { + position: relative; + display: -webkit-box; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + flex-direction: column; + -webkit-box-flex: 1; + -webkit-box-align: center; + align-items: center; + flex: 1 1; + padding: 0 12px +} +.step-dots .nav-step-item:first-child a::before { + display: none +} +.step-dots .nav-step-item.complete a, +.step-dots .nav-step-item.complete a::before, +.step-dots .nav-step-item.active a, +.step-dots .nav-step-item.active a::before { + background-color: #dcfcfa +} +.step-dots .nav-step-item.complete a::after, +.step-dots .nav-step-item.active a::after { + background-color: #33cabb; + width: 29px; + height: 29px; + -webkit-transform: translateX(0); + transform: translateX(0); + color: #fff +} +.step-dots .nav-step-item.complete a::after { + width: 29px; + height: 29px; + -webkit-transform: translateX(0); + transform: translateX(0); + color: #fff +} +.step-dots .nav-step-item.active a::after { + width: 13px; + height: 13px; + margin-top: 8px; + -webkit-transform: translateX(8px); + transform: translateX(8px); + color: transparent +} +.step-dots a { + display: -webkit-inline-box; + display: inline-flex; + padding: 0; + margin: 10px 0; + width: 29px; + height: 29px; + max-height: 29px; + border-radius: 50%; + background-color: #f7fafc; + -webkit-transition: .5s; + transition: .5s; + z-index: 1 +} +.step-dots a::before { + content: ''; + position: absolute; + left: calc(-50% + 14.5px); + right: calc(50% + 14.5px); + height: 10px; + margin-top: 9.5px; + background-color: #f7fafc; + cursor: default; + -webkit-transition: .5s; + transition: .5s; +} +.step-dots a::after { + content: "\f12c"; + font-family: "Material Design Icons"; + width: 0; + height: 0; + text-align: center; + font-size: 15px; + position: absolute; + border-radius: 50%; + background-color: transparent; + color: transparent; + -webkit-transform: translate(14.5px, 14.5px); + transform: translate(14.5px, 14.5px); + -webkit-transition: .5s; + transition: .5s; + z-index: 1; + display: -webkit-inline-box; + display: inline-flex; + -webkit-box-align: center; + align-items: center; + -webkit-box-pack: center; + justify-content: center +} +.nav-step-pane.active { + display: block!important; +} +.nav-step-button { + display: -webkit-box; + display: flex; + -webkit-box-pack: justify; + justify-content: space-between; +} +.nav-step-button button.disabled { + opacity: 0; +} + +.nav-step.step-anchor { + justify-content: flex-start; + border: 0; + background: #fcfdfe; + border-radius: 0; + list-style: none; + overflow: hidden; +} +.step-anchor > li > a, +.step-anchor > li > a:hover { + color: #bbb; + text-decoration: none; + padding: 10px 0 10px 45px; + position: relative; + display: block; + border: 0!important; + border-radius: 0; + outline-style: none; + background: #f7fafc; +} +.step-anchor > li > a:before, +.step-anchor > li > a:after { + -webkit-transition: .2s linear; + transition: .2s linear; +} +.step-anchor > li > a:after { + content: " "; + display: block; + width: 0; + height: 0; + border-top: 50px solid transparent; + border-bottom: 50px solid transparent; + border-left: 30px solid #f7fafc; + position: absolute; + top: 50%; + margin-top: -50px; + left: 100%; + z-index: 2 +} +.step-anchor > li > a:before { + content: " "; + display: block; + width: 0; + height: 0; + border-top: 50px solid transparent; + border-bottom: 50px solid transparent; + border-left: 30px solid rgba(77,82,89,0.075); + position: absolute; + top: 50%; + margin-top: -50px; + margin-left: 1px; + left: 100%; + z-index: 1 +} +.step-anchor > li:first-child > a { + padding-left: 15px; +} +.step-anchor > li.active h6, +.step-anchor > li.complete h6 { + color: #fff!important; +} +.step-anchor > li.active > a, +.step-anchor > li.complete > a { + border-color: #33cabb!important; + color: rgba(255, 255, 255, .8)!important; + background: #33cabb!important; +} +.step-anchor > li.active > a:after, +.step-anchor > li.complete > a:after { + border-left: 30px solid #33cabb!important; +} + +/* 多图上传 */ +.lyear-uploads-pic { + display: -webkit-flex; + display: flex; + -webkit-align-items: stretch; + align-items: stretch; + flex-direction: row; + flex-wrap: wrap; + margin-bottom: -10px; +} +.lyear-uploads-pic li { + margin-bottom: 10px; +} +.lyear-uploads-pic figure { + position: relative; + background: #4d5259; + overflow: hidden; + text-align: center; + cursor: pointer; +} +.lyear-uploads-pic figure img { + position: relative; + display: block; + min-height: 100%; + max-width: 100%; + width: 100%; + opacity: 1; + backface-visibility: hidden; + -webkit-backface-visibility: hidden; + -webkit-transition: opacity 0.5s; + transition: opacity 0.5s; +} +.lyear-uploads-pic figure:hover img { + opacity: 0.5; +} +.lyear-uploads-pic figure figcaption, +.lyear-uploads-pic figure figcaption > a:not(.btn) { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.lyear-uploads-pic figure figcaption { + display: -webkit-box; + display: flex; + -webkit-box-align: center; + align-items: center; + -webkit-box-pack: center; + justify-content: center; + text-transform: none; + padding: 2em; + color: #fff; + -webkit-transform: scale(0); + transform: scale(0); + -webkit-transition: .35s; + transition: .35s; +} +.lyear-uploads-pic figure figcaption > a { + position: static; + z-index: auto; + text-indent: 0; + white-space: nowrap; + opacity: 1; + margin-left: 2px; + margin-right: 2px +} +.lyear-uploads-pic figure figcaption > *:first-child { + margin-left: 0; +} +.lyear-uploads-pic figure:hover figcaption { + -webkit-transform: scale(1); + transform: scale(1) +} +.lyear-uploads-pic .pic-add { + display: -webkit-flex; + justify-content: center; + align-items: center; + height: 100%; + border: 1px dashed #ebebeb; + font-family: "Material Design Icons"; + font-size: 2.875rem; + color: #8b95a5; + -webkit-transition: .35s; + transition: .35s; +} +.lyear-uploads-pic .pic-add:before { + content: "\f415"; +} +.lyear-uploads-pic .pic-add:hover { + border-color: #33cabb; + color: #33cabb; +} + +/** ---------------------------------- + * 响应式处理 + -------------------------------------- */ +@media (max-width: 1024px) { + .lyear-layout-sidebar { + transform: translateX(-100%); + } + .lyear-layout-header, + .lyear-layout-content { + padding-left: 0; + } + .lyear-layout-sidebar { + -webkit-box-shadow: none; + -moz-webkit-box-shadow: none; + box-shadow: none; + } + .lyear-layout-sidebar.lyear-aside-open { + transform: translateX(0); + } + /* 遮罩层 */ + .lyear-mask-modal { + background-color: rgba(0, 0, 0, 0.5); + height: 100%; + left: 0; + opacity: 1; + top: 0; + visibility: visible; + width: 100%; + z-index: 5; + position: fixed; + -webkit-transition: visibility 0 linear 0.4s, opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1); + transition: visibility 0 linear 0.4s, opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1); + -webkit-transform: translateZ(0); + transform: translateZ(0); + } +} +@media screen and (max-width: 767px) { + .table-responsive { + border-color: #eceeef; + } +} +@media screen and (max-width: 700px) { + .card-toolbar .search-bar { + max-width: 100%; + margin-bottom: 10px; + float: none!important; + } + .masonry-grid { + -webkit-column-count: 2; + -moz-column-count: 2; + column-count: 2; + } +} +@media screen and (max-width: 430px) { + .navbar-page-title { + display: none; + } + .dropdown-skin .dropdown-menu { + left: -80px!important; + } + .nav-step .nav-step-item p { + display: none; + } +} + +@media (min-width: 1024px) { + .masonry-grid { + -webkit-column-count: 4; + -moz-column-count: 4; + column-count: 4; + } +} + +/** ---------------------------------- + * 主题设置 + -------------------------------------- */ +.icon-palette { + display: block; + height: 68px; + line-height: 68px; + font-size: 1.5em; + cursor: pointer; + padding: 0 12px; + text-align: center; +} +.drop-title { + color: #4d5259; +} +.drop-title p { + padding: 5px 15px 0px 15px; +} +.drop-skin-li { + padding: 0px 12px; +} +.drop-skin-li input[type=radio] { + display: none; +} +.drop-skin-li input[type=radio]+label { + display: inline-block; + width: 20px; + height: 20px; + cursor: pointer; + margin: 3px; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + border-radius: 50%; + -webkit-transition: all .1s ease; + transition: all .1s ease; +} +.drop-skin-li input[type=radio]:checked+label { + position: relative; +} +.drop-skin-li input[type=radio]:checked+label::after { + content: "\f12c"; + font-family: "Material Design Icons"; + font-size: 1rem; + display: block; + color: #fff; + width: 100%; + text-align: center; + line-height: 20px; + position: absolute; + top: 0px; + -webkit-transition: .2s; + transition: .2s; +} +.drop-skin-li .inverse input[type=radio]:checked+label::after { + color: #4d5259; +} +.dropdown-skin .dropdown-menu { + border: none; + width: 262px; +} + +#header_bg_1+label, #logo_bg_1+label, #sidebar_bg_1+label, #site_theme_1+label { + background-color: #fff; + border: 1px solid #f0f0f0; +} +#header_bg_2+label, #logo_bg_2+label, #sidebar_bg_2+label { + background-color: #15c377; + border: 1px solid #15c377; +} +#header_bg_3+label, #logo_bg_3+label, #sidebar_bg_3+label { + background-color: #48b0f7; + border: 1px solid #48b0f7; +} +#header_bg_4+label, #logo_bg_4+label, #sidebar_bg_4+label { + background-color: #faa64b; + border: 1px solid #faa64b; +} +#header_bg_5+label, #logo_bg_5+label, #sidebar_bg_5+label { + background-color: #f96868; + border: 1px solid #f96868; +} +#header_bg_6+label, #logo_bg_6+label, #sidebar_bg_6+label { + background-color: #926dde; + border: 1px solid #926dde; +} +#header_bg_7+label, #logo_bg_7+label, #sidebar_bg_7+label { + background-color: #33cabb; + border: 1px solid #33cabb; +} +#header_bg_8+label, #logo_bg_8+label, #sidebar_bg_8+label, #site_theme_2+label { + background-color: #465161; + border: 1px solid #465161; +} +#site_theme_3+label { + background: -webkit-linear-gradient(135deg, #65FDF0 10%, #1D6FA3 100%); + background: -o-linear-gradient(135deg, #65FDF0 10%, #1D6FA3 100%); + background: -moz-linear-gradient(135deg, #65FDF0 10%, #1D6FA3 100%); + background: linear-gradient(135deg, #65FDF0 10%, #1D6FA3 100%); +} + +/* 暗黑 */ +body[data-theme='dark'] { + background-color: #1c1e2f; + color: #8c909a; +} +body[data-theme='dark'] .jconfirm.jconfirm-white .jconfirm-bg, +body[data-theme='dark'] .jconfirm.jconfirm-light .jconfirm-bg { + background-color: #fff; +} +body[data-theme='dark'] a, +[data-theme='dark'] .input-group-addon, +[data-theme='dark'] a.list-group-item, +[data-theme='dark'] button.list-group-item, +[data-theme='dark'] h1, +[data-theme='dark'] h2, +[data-theme='dark'] h3, +[data-theme='dark'] h4, +[data-theme='dark'] h5, +[data-theme='dark'] h6, +[data-theme='dark'] .h1, +[data-theme='dark'] .h2, +[data-theme='dark'] .h3, +[data-theme='dark'] .h4, +[data-theme='dark'] .h5, +[data-theme='dark'] .h6 { + color: #8c909a; +} +[data-theme='dark'] code, +[data-theme='dark'] .panel { + background-color: #292B3D; +} +[data-theme='dark'] .lyear-aside-toggler .lyear-toggler-bar { + background-color: #8c909a; +} +[data-theme='dark'] .lyear-layout-header { + -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); + -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); + box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); +} +[data-theme='dark'] .sidebar-header { + -webkit-box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.35); + -moz-box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.35); + box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.35); +} +[data-theme='dark'] .lyear-layout-sidebar-scroll { + -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.35); + -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.35); + box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.35) +} +[data-theme='dark'] .sidebar-header, +[data-theme='dark'] .lyear-layout-sidebar-scroll, +[data-theme='dark'] .lyear-layout-header, +[data-theme='dark'] .card, +[data-theme='dark'] .jconfirm .jconfirm-box { + background-color: #222437; +} +[data-theme='dark'] .nav-drawer > .active > a { + background-color: #202234!important; +} +[data-theme='dark'] .nav-drawer .nav-subnav > li.active > a, +[data-theme='dark'] .nav-drawer .nav-subnav > li > a:hover { + color: #bebdc2; +} +[data-theme='dark'] hr, +[data-theme='dark'] .card-header, +[data-theme='dark'] .sidebar-footer, +[data-theme='dark'] .modal-header, +[data-theme='dark'] .modal-footer, +[data-theme='dark'] .card-footer, +[data-theme='dark'] .table>tbody>tr>td, +[data-theme='dark'] .table>tbody>tr>th, +[data-theme='dark'] .table>tfoot>tr>td, +[data-theme='dark'] .table>tfoot>tr>th, +[data-theme='dark'] .table>thead>tr>td, +[data-theme='dark'] .table>thead>tr>th, +[data-theme='dark'] .table-bordered { + border-color: #303243; +} +[data-theme='dark'] .table-hover > tbody > tr:hover, +[data-theme='dark'] .table-striped tbody tr:nth-of-type(odd) { + background-color: #292B3D; +} +[data-theme='dark'] .dropdown-menu, +[data-theme='dark'] .modal-content { + background-color: #222437; + border: none; + -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); + -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.35); + box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); +} +[data-theme='dark'] .dropdown-menu > li > a:focus, +[data-theme='dark'] .dropdown-menu > li > a:hover, +[data-theme='dark'] .dropdown-menu>.active>a, +[data-theme='dark'] .dropdown-menu>.active>a:focus, +[data-theme='dark'] .dropdown-menu>.active>a:hover { + background-color: #292B3D; + color: #bebdc2; +} +[data-theme='dark'] .dropdown-menu .divider { + background-color: #303243; +} +[data-theme='dark'] .divider::before, +[data-theme='dark'] .divider::after { + border-color: #303243; +} + +[data-theme='dark'] .popover { + background-color: #222437; + border: none; + -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.35); + box-shadow: 0 0 4px rgba(0, 0, 0, 0.35); +} +[data-theme='dark'] .popover.top>.arrow:after { + border-top-color: #222437; +} +[data-theme='dark'] .popover.right>.arrow:after { + border-right-color: #222437; +} +[data-theme='dark'] .popover.bottom>.arrow:after { + border-bottom-color: #222437; +} +[data-theme='dark'] .popover.left>.arrow:after { + border-left-color: #222437; +} +[data-theme='dark'] .popover.top>.arrow { + border-top-color: #1D1F2F; +} +[data-theme='dark'] .popover.right>.arrow { + border-right-color: #1D1F2F; +} +[data-theme='dark'] .popover.bottom>.arrow { + border-bottom-color: #1D1F2F; +} +[data-theme='dark'] .popover.left>.arrow { + border-left-color: #1D1F2F; +} +[data-theme='dark'] .popover-title { + background-color: #222437; + border-color: #303243; +} + +[data-theme='dark'] .progress, +[data-theme='dark'] .irs--flat .irs-min, +[data-theme='dark'] .irs--flat .irs-max, +[data-theme='dark'] .irs--flat .irs-line { + background-color: #303243; +} + +[data-theme='dark'] .nav-tabs, +[data-theme='dark'] blockquote { + border-color: #303243; +} +[data-theme='dark'] .nav-tabs > li.active > a, +[data-theme='dark'] .nav-tabs > li.active > a:focus, +[data-theme='dark'] .nav-tabs > li.active > a:hover { + color: #bebdc2; +} + +@media (min-width: 768px) { + [data-theme='dark'] .nav-tabs.nav-justified>li>a { + border-bottom-color: #303243; + } +} +[data-theme='dark'] .nav-tabs.nav-justified>.active>a, +[data-theme='dark'] .nav-tabs.nav-justified>.active>a:focus, +[data-theme='dark'] .nav-tabs.nav-justified>.active>a:hover { + border-bottom-color: #33cabb; +} + +[data-theme='dark'] :not(panel-default) .panel-title a { + color: #fff; +} +[data-theme='dark'] .form-control { + border-color: #303243; + background-color: #1D1F2F; +} +[data-theme='dark'] .form-control:focus { + border-color: #33cabb; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(51, 202, 187, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(51, 202, 187, .6); +} +[data-theme='dark'] div.tagsinput, +[data-theme='dark'] .input-group-addon, +[data-theme='dark'] .input-group-btn .btn-default, +[data-theme='dark'] .btn-group .btn-default, +[data-theme='dark'] .btn-group-vertical .btn-default, +[data-theme='dark'] .pagination > li > a, +[data-theme='dark'] .pagination > li > span { + border-color: #303243!important; + background-color: #1D1F2F!important; +} +[data-theme='dark'] .pagination > li > a:hover, +[data-theme='dark'] .pagination > li > a:focus +[data-theme='dark'] .pagination > li > span:hover, +[data-theme='dark'] .pagination > li > span:focus { + background-color: #191A28; + color: #8c909a; +} +[data-theme='dark'] .pagination > .active > a, +[data-theme='dark'] .pagination > .active > a:focus, +[data-theme='dark'] .pagination > .active > a:hover, +[data-theme='dark'] .pagination > .active > span, +[data-theme='dark'] .pagination > .active > span:focus, +[data-theme='dark'] .pagination > .active > span:hover { + border-color: #303243; + background-color: #191A28; + color: #fff; +} +[data-theme='dark'] .pager li > a, +[data-theme='dark'] .pager li > span { + background-color: #1D1F2F; + border-color: #303243; +} +[data-theme='dark'] .pager li > a:hover, +[data-theme='dark'] .pager li > a:focus{ + background-color: #191A28; + color: #8c909a +} +[data-theme='dark'] .pager li > a:active, +[data-theme='dark'] .pager li > a.active { + background-color: #191A28; + color: #fff +} +[data-theme='dark'] .pager .disabled > a, +[data-theme='dark'] .pager .disabled > a:focus, +[data-theme='dark'] .pager .disabled > a:hover, +[data-theme='dark'] .pager .disabled > span { + opacity: .6; + background-color: #1D1F2F; +} + +[data-theme='dark'] .well { + background-color: #292B3D; + border-color: #303243; +} + +[data-theme='dark'] .list-group-item { + background-color: transparent; + border-color: #303243; +} +[data-theme='dark'] .list-group-item.active, +[data-theme='dark'] .list-group-item.active:focus, +[data-theme='dark'] .list-group-item.active:hover { + background-color: #33cabb; + border-color: #33cabb; + color: #fff; +} +[data-theme='dark'] a.list-group-item:hover, +[data-theme='dark'] button.list-group-item:hover, +[data-theme='dark'] a.list-group-item:focus, +[data-theme='dark'] button.list-group-item:focus { + background-color: #292B3D; + color: #bebdc2; +} +[data-theme='dark'] button.list-group-item { + -webkit-transition: .2s linear; + transition: .2s linear +} +[data-theme='dark'] .list-group-item.disabled, +[data-theme='dark'] .list-group-item.disabled:focus, +[data-theme='dark'] .list-group-item.disabled:hover { + background-color: #292B3D; + color: #bebdc2; +} +[data-theme='dark'] .list-group-item-success, +[data-theme='translucent'] .list-group-item-success { + color: #155724!important; +} +[data-theme='dark'] .list-group-item-info, +[data-theme='translucent'] .list-group-item-info { + color: #0c5460!important; +} +[data-theme='dark'] .list-group-item-warning, +[data-theme='translucent'] .list-group-item-warning { + color: #856404!important; +} +[data-theme='dark'] .list-group-item-danger, +[data-theme='translucent'] .list-group-item-danger { + color: #721c24!important; +} +[data-theme='dark'] a.list-group-item .list-group-item-heading, +[data-theme='dark'] button.list-group-item .list-group-item-heading { + color: #bebdc2; +} +[data-theme='dark'] .list-group-item.active .list-group-item-heading, +[data-theme='dark'] .list-group-item.active .list-group-item-heading>.small, +[data-theme='dark'] .list-group-item.active .list-group-item-heading>small, +[data-theme='dark'] .list-group-item.active:focus .list-group-item-heading, +[data-theme='dark'] .list-group-item.active:focus .list-group-item-heading>.small, +[data-theme='dark'] .list-group-item.active:focus .list-group-item-heading>small, +[data-theme='dark'] .list-group-item.active:hover .list-group-item-heading, +[data-theme='dark'] .list-group-item.active:hover .list-group-item-heading>.small, +[data-theme='dark'] .list-group-item.active:hover .list-group-item-heading>small { + color: #fff; +} +[data-theme='dark'] .lyear-checkbox span::before, +[data-theme='dark'] .lyear-radio span::before { + border-color: #656B77; +} +[data-theme='dark'] .lyear-checkbox.checkbox-grey span::before, +[data-theme='dark'] .lyear-checkbox.radio-grey span::before, +[data-theme='dark'] .lyear-radio.checkbox-grey span::before, +[data-theme='dark'] .lyear-radio.radio-grey span::before { + background-color: #656B77; +} +[data-theme='dark'] .lyear-switch span { + background-color: #1D1F2F; + border-color: #1D1F2F; +} +[data-theme='dark'] .lyear-switch.switch-outline span { + background-color: transparent; +} +[data-theme='dark'] .input-group-btn .btn-default:focus, +[data-theme='dark'] .input-group-btn .btn-default.focus, +[data-theme='dark'] .input-group-btn .btn-default:active, +[data-theme='dark'] .input-group-btn .btn-default.active, +[data-theme='dark'] .input-group-btn .show>.btn-default.dropdown-toggle, +[data-theme='dark'] .input-group-btn .open>.btn-default.dropdown-toggle { + border-color: #303243!important; + background-color: #292B3D!important; + color: #BEBDC2; +} +[data-theme='dark'] .input-group-btn .btn-default:hover { + color: #BEBDC2; +} +[data-theme='dark'] .has-success .input-group-addon { + color: #15c377!important; + border-color: #15c377!important; +} +[data-theme='dark'] .has-info .input-group-addon { + color: #48b0f7!important; + border-color: #48b0f7!important; +} +[data-theme='dark'] .has-warning .input-group-addon { + color: #faa64b!important; + border-color: #faa64b!important; +} +[data-theme='dark'] .has-error .input-group-addon { + color: #f96868!important; + border-color: #f96868!important; +} +[data-theme='dark'] .login-center { + background-color: #222437; + -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); + -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.35); + box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); +} +[data-theme='dark'] .datepicker-dropdown.datepicker-orient-top:after { + border-top-color: #222437; +} +[data-theme='dark'] .datepicker-dropdown:after { + border-bottom-color: #222437; +} +[data-theme='dark'] .bootstrap-datetimepicker-widget.dropdown-menu.bottom:before { + border-bottom-color: #1D1E2F; +} +[data-theme='dark'] .bootstrap-datetimepicker-widget.dropdown-menu.bottom:after { + border-bottom-color: #222437; +} +[data-theme='dark'] .bootstrap-datetimepicker-widget.dropdown-menu.top:before { + border-top-color: #1D1E2F; +} +[data-theme='dark'] .bootstrap-datetimepicker-widget.dropdown-menu.top:after { + border-top-color: #222437; +} +[data-theme='dark'] .bootstrap-datetimepicker-widget .btn { + background-color: transparent; +} +[data-theme='dark'] .close { + text-shadow: none; + -webkit-transition: .2s linear; + transition: .2s linear +} +[data-theme='dark'] .alert-success { + background-color: #16d17f; + border-color: #16d17f; + color: #fff; +} +[data-theme='dark'] .alert-info { + background-color: #48b0f7; + border-color: #48b0f7; + color: #fff; +} +[data-theme='dark'] .alert-warning { + background-color: #faa64b; + border-color: #faa64b; + color: #fff; +} +[data-theme='dark'] .alert-danger { + background-color: #f96868; + border-color: #f96868; + color: #fff; +} +[data-theme='dark'] .alert-link { + color: #fff; +} +[data-theme='dark'] .alert h1, +[data-theme='dark'] .alert h2, +[data-theme='dark'] .alert h3, +[data-theme='dark'] .alert h4, +[data-theme='dark'] .alert h5, +[data-theme='dark'] .alert h6, +[data-theme='dark'] .alert .h1, +[data-theme='dark'] .alert .h2, +[data-theme='dark'] .alert .h3, +[data-theme='dark'] .alert .h4, +[data-theme='dark'] .alert .h5, +[data-theme='dark'] .alert .h6 { + color: #fff; +} + +/* 半透明 */ +body[data-theme='translucent'] { + color: rgba(255, 255, 255, .85); + background: -webkit-linear-gradient(135deg, #65FDF0 10%, #1D6FA3 100%); + background: -o-linear-gradient(135deg, #65FDF0 10%, #1D6FA3 100%); + background: -moz-linear-gradient(135deg, #65FDF0 10%, #1D6FA3 100%); + background: linear-gradient(135deg, #65FDF0 10%, #1D6FA3 100%); + background-repeat: no-repeat; + background-size: cover; + background-attachment: fixed; +} +body[data-theme='translucent'] .jconfirm { + color: #4d5259; +} +[data-theme='translucent'] ::-webkit-input-placeholder { + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] :-moz-placeholder { + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] ::-moz-placeholder { + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] :-ms-input-placeholder { + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .sidebar-footer { + border-color: rgba(255, 255, 255, .075); +} +[data-theme='translucent'] a, +[data-theme='translucent'] h1, +[data-theme='translucent'] h2, +[data-theme='translucent'] h3, +[data-theme='translucent'] h4, +[data-theme='translucent'] h5, +[data-theme='translucent'] h6, +[data-theme='translucent'] .h1, +[data-theme='translucent'] .h2, +[data-theme='translucent'] .h3, +[data-theme='translucent'] .h4, +[data-theme='translucent'] .h5, +[data-theme='translucent'] .h6, +[data-theme='translucent'] .divider { + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .h1 .small, +[data-theme='translucent'] .h1 small, +[data-theme='translucent'] .h2 .small, +[data-theme='translucent'] .h2 small, +[data-theme='translucent'] .h3 .small, +[data-theme='translucent'] .h3 small, +[data-theme='translucent'] .h4 .small, +[data-theme='translucent'] .h4 small, +[data-theme='translucent'] .h5 .small, +[data-theme='translucent'] .h5 small, +[data-theme='translucent'] .h6 .small, +[data-theme='translucent'] .h6 small, +[data-theme='translucent'] h1 .small, +[data-theme='translucent'] h1 small, +[data-theme='translucent'] h2 .small, +[data-theme='translucent'] h2 small, +[data-theme='translucent'] h3 .small, +[data-theme='translucent'] h3 small, +[data-theme='translucent'] h4 .small, +[data-theme='translucent'] h4 small, +[data-theme='translucent'] h5 .small, +[data-theme='translucent'] h5 small, +[data-theme='translucent'] h6 .small, +[data-theme='translucent'] h6 small { + color: rgba(255, 255, 255, .65); +} +[data-theme='translucent'] a:hover, +[data-theme='translucent'] .nav-drawer .nav-subnav > li.active > a, +[data-theme='translucent'] .nav-drawer .nav-subnav > li > a:hover, +[data-theme='translucent'] .card-header h1, +[data-theme='translucent'] .card-header h2, +[data-theme='translucent'] .card-header h3, +[data-theme='translucent'] .card-header h4, +[data-theme='translucent'] .card-header h5, +[data-theme='translucent'] .card-header h6, +[data-theme='translucent'] .card-header .h1, +[data-theme='translucent'] .card-header .h2, +[data-theme='translucent'] .card-header .h3, +[data-theme='translucent'] .card-header .h4, +[data-theme='translucent'] .card-header .h5, +[data-theme='translucent'] .card-header .h6 { + color: #fff; +} +[data-theme='translucent'] .card, +[data-theme='translucent'] .sidebar-header, +[data-theme='translucent'] .lyear-layout-sidebar-scroll, +[data-theme='translucent'] .lyear-layout-header { + background-color: rgba(0, 0, 0, .075); +} +[data-theme='translucent'] .card-header, +[data-theme='translucent'] .modal-header, +[data-theme='translucent'] .modal-footer, +[data-theme='translucent'] .divider::before, +[data-theme='translucent'] .divider::after, +[data-theme='translucent'] .card-footer { + border-color: rgba(255, 255, 255, .075); +} +[data-theme='translucent'] .lyear-aside-toggler .lyear-toggler-bar { + background-color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .table-bordered, +[data-theme='translucent'] .table>tbody>tr>td, +[data-theme='translucent'] .table>tbody>tr>th, +[data-theme='translucent'] .table>tfoot>tr>td, +[data-theme='translucent'] .table>tfoot>tr>th, +[data-theme='translucent'] .table>thead>tr>td, +[data-theme='translucent'] .table>thead>tr>th { + border-color: rgba(255, 255, 255, .075); +} +[data-theme='translucent'] .table-striped tbody tr:nth-of-type(odd) { + background-color: rgba(255, 255, 255, .1); +} +[data-theme='translucent'] .table-hover > tbody > tr:hover, +[data-theme='translucent'] a.list-group-item:focus, +[data-theme='translucent'] a.list-group-item:hover, +[data-theme='translucent'] button.list-group-item:focus, +[data-theme='translucent'] button.list-group-item:hover { + background-color: rgba(255, 255, 255, .075); +} +[data-theme='translucent'] .table>tbody>tr.active>td, +[data-theme='translucent'] .table>tbody>tr.active>th, +[data-theme='translucent'] .table>tbody>tr>td.active, +[data-theme='translucent'] .table>tbody>tr>th.active, +[data-theme='translucent'] .table>tfoot>tr.active>td, +[data-theme='translucent'] .table>tfoot>tr.active>th, +[data-theme='translucent'] .table>tfoot>tr>td.active, +[data-theme='translucent'] .table>tfoot>tr>th.active, +[data-theme='translucent'] .table>thead>tr.active>td, +[data-theme='translucent'] .table>thead>tr.active>th, +[data-theme='translucent'] .table>thead>tr>td.active, +[data-theme='translucent'] .table>thead>tr>th.active { + background-color: rgba(245, 245, 245, .35); +} +[data-theme='translucent'] .table>tbody>tr.success>td, +[data-theme='translucent'] .table>tbody>tr.success>th, +[data-theme='translucent'] .table>tbody>tr>td.success, +[data-theme='translucent'] .table>tbody>tr>th.success, +[data-theme='translucent'] .table>tfoot>tr.success>td, +[data-theme='translucent'] .table>tfoot>tr.success>th, +[data-theme='translucent'] .table>tfoot>tr>td.success, +[data-theme='translucent'] .table>tfoot>tr>th.success, +[data-theme='translucent'] .table>thead>tr.success>td, +[data-theme='translucent'] .table>thead>tr.success>th, +[data-theme='translucent'] .table>thead>tr>td.success, +[data-theme='translucent'] .table>thead>tr>th.success { + background-color: rgba(21, 195, 119, .35); +} +[data-theme='translucent'] .table>tbody>tr.info>td, +[data-theme='translucent'] .table>tbody>tr.info>th, +[data-theme='translucent'] .table>tbody>tr>td.info, +[data-theme='translucent'] .table>tbody>tr>th.info, +[data-theme='translucent'] .table>tfoot>tr.info>td, +[data-theme='translucent'] .table>tfoot>tr.info>th, +[data-theme='translucent'] .table>tfoot>tr>td.info, +[data-theme='translucent'] .table>tfoot>tr>th.info, +[data-theme='translucent'] .table>thead>tr.info>td, +[data-theme='translucent'] .table>thead>tr.info>th, +[data-theme='translucent'] .table>thead>tr>td.info, +[data-theme='translucent'] .table>thead>tr>th.info { + background-color: rgba(72, 176, 247, .35); +} +[data-theme='translucent'] .table>tbody>tr.warning>td, +[data-theme='translucent'] .table>tbody>tr.warning>th, +[data-theme='translucent'] .table>tbody>tr>td.warning, +[data-theme='translucent'] .table>tbody>tr>th.warning, +[data-theme='translucent'] .table>tfoot>tr.warning>td, +[data-theme='translucent'] .table>tfoot>tr.warning>th, +[data-theme='translucent'] .table>tfoot>tr>td.warning, +[data-theme='translucent'] .table>tfoot>tr>th.warning, +[data-theme='translucent'] .table>thead>tr.warning>td, +[data-theme='translucent'] .table>thead>tr.warning>th, +[data-theme='translucent'] .table>thead>tr>td.warning, +[data-theme='translucent'] .table>thead>tr>th.warning { + background-color: rgba(250, 166, 75, .35); +} +[data-theme='translucent'] .table>tbody>tr.danger>td, +[data-theme='translucent'] .table>tbody>tr.danger>th, +[data-theme='translucent'] .table>tbody>tr>td.danger, +[data-theme='translucent'] .table>tbody>tr>th.danger, +[data-theme='translucent'] .table>tfoot>tr.danger>td, +[data-theme='translucent'] .table>tfoot>tr.danger>th, +[data-theme='translucent'] .table>tfoot>tr>td.danger, +[data-theme='translucent'] .table>tfoot>tr>th.danger, +[data-theme='translucent'] .table>thead>tr.danger>td, +[data-theme='translucent'] .table>thead>tr.danger>th, +[data-theme='translucent'] .table>thead>tr>td.danger, +[data-theme='translucent'] .table>thead>tr>th.danger { + background-color: rgba(249, 104, 104, .35); +} +[data-theme='translucent'] .btn-default { + border-color: rgba(255, 255, 255, .075); + background-color: rgba(255, 255, 255, .075); + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .btn-default:hover { + background-color: rgba(255, 255, 255, .125); + border-color: rgba(255, 255, 255, .125); + color: #fff +} +[data-theme='translucent'] .btn-default:focus, +[data-theme='translucent'] .btn-default.focus, +[data-theme='translucent'] .btn-default:active, +[data-theme='translucent'] .btn-default.active, +[data-theme='translucent'] .show>.btn-default.dropdown-toggle, +[data-theme='translucent'] .open>.btn-default.dropdown-toggle, +[data-theme='translucent'] .btn-default:not([disabled]):not(.disabled).active, +[data-theme='translucent'] .btn-default:not([disabled]):not(.disabled):active, +[data-theme='translucent'] .show>.btn-default.dropdown-toggle, +[data-theme='translucent'] .btn-default.disabled, +[data-theme='translucent'] .btn-default:disabled { + background-color: rgba(255, 255, 255, .125)!important; + border-color: rgba(255, 255, 255, .125)!important; + color: #fff +} +[data-theme='translucent'] .dropdown-menu { + border: none; +} +[data-theme='translucent'] blockquote { + border-color: rgba(255, 255, 255, .1); +} +[data-theme='translucent'] blockquote .small, +[data-theme='translucent'] blockquote footer, +[data-theme='translucent'] blockquote small { + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .bg-white { + background-color: rgba(255, 255, 255, .35) !important +} +[data-theme='translucent'] .bg-lightest { + background-color: rgba(253, 252, 254, .35)!important; +} +[data-theme='translucent'] .bg-lighter { + background-color: rgba(249, 250, 251, .35) !important; +} +[data-theme='translucent'] .bg-light { + background-color: rgba(245, 246, 247, .35) !important; +} +[data-theme='translucent'] .progress { + background-color: rgba(245, 246, 247, .075); +} + +[data-theme='translucent'] .nav-tabs { + border-bottom-color: rgba(255, 255, 255, .075); +} +[data-theme='translucent'] .nav-tabs > li > a { + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .nav-tabs > li.active > a, +[data-theme='translucent'] .nav-tabs > li.active > a:focus, +[data-theme='translucent'] .nav-tabs > li.active > a:hover, +[data-theme='translucent'] .nav-tabs.nav-justified > .active > a, +[data-theme='translucent'] .nav-tabs.nav-justified > .active > a:focus, +[data-theme='translucent'] .nav-tabs.nav-justified > .active > a:hover { + color: #fff; + border-bottom-color: rgba(255, 255, 255, .35); +} +[data-theme='translucent'] .nav-tabs.nav > li > a:hover, +[data-theme='translucent'] .nav-tabs.nav > li > a:focus { + border-bottom-color: rgba(255, 255, 255, .35); +} +@media (min-width: 768px) { + [data-theme='translucent'] .nav-tabs.nav-justified>li>a { + border-bottom-color: rgba(255, 255, 255, .075); + } +} +[data-theme='translucent'] .modal-content, +[data-theme='translucent'] .popover { + background-color: #474747; + border: none; + -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, .35); + -moz-box-shadow: 0 0 4px rgba(0, 0, 0, .35); + box-shadow: 0 0 4px rgba(0, 0, 0, .35); +} +[data-theme='translucent'] .popover-title { + background-color: #474747; + border-color: rgba(255, 255, 255, .075); +} +[data-theme='translucent'] .popover.top>.arrow { + border-top-color: #474747; +} +[data-theme='translucent'] .popover.right>.arrow { + border-right-color: #474747; +} +[data-theme='translucent'] .popover.bottom>.arrow { + border-bottom-color: #474747; +} +[data-theme='translucent'] .popover.left>.arrow { + border-left-color: #474747; +} +[data-theme='translucent'] .popover.top>.arrow:after, +[data-theme='translucent'] .popover.right>.arrow:after, +[data-theme='translucent'] .popover.bottom>.arrow:after, +[data-theme='translucent'] .popover.left>.arrow:after { + border-color: transparent; +} + +[data-theme='translucent'] .alert-success, +[data-theme='translucent'] .alert-info, +[data-theme='translucent'] .alert-warning, +[data-theme='translucent'] .alert-danger { + border: none; + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .alert-success a, +[data-theme='translucent'] .alert-info a, +[data-theme='translucent'] .alert-warning a, +[data-theme='translucent'] .alert-danger a { + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .alert-success { + background-color: #15c377; +} +[data-theme='translucent'] .alert-info { + background-color: #48b0f7; +} +[data-theme='translucent'] .alert-warning { + background-color: #faa64b; +} +[data-theme='translucent'] .alert-danger { + background-color: #f96868; +} +[data-theme='translucent'] .pagination > li > a, +[data-theme='translucent'] .pagination > li > span, +[data-theme='translucent'] .pager li > a, +[data-theme='translucent'] .pager li > span { + color: rgba(255, 255, 255, .85); + border-color: rgba(255, 255, 255, .125); + background-color: rgba(255, 255, 255, .075); +} +[data-theme='translucent'] .pagination > li > a:hover, +[data-theme='translucent'] .pagination > li > a:focus +[data-theme='translucent'] .pagination > li > span:hover, +[data-theme='translucent'] .pagination > li > span:focus, +[data-theme='translucent'] .pager li > a:hover, +[data-theme='translucent'] .pager li > a:focus { + color: #fff; + background-color: rgba(255, 255, 255, .125); +} +[data-theme='translucent'] .pagination > .active > a, +[data-theme='translucent'] .pagination > .active > a:focus, +[data-theme='translucent'] .pagination > .active > a:hover, +[data-theme='translucent'] .pagination > .active > span, +[data-theme='translucent'] .pagination > .active > span:focus, +[data-theme='translucent'] .pagination > .active > span:hover, +[data-theme='translucent'] .pager li > a:active, +[data-theme='translucent'] .pager li > a.active { + background-color: rgba(255, 255, 255, .125); +} +[data-theme='translucent'] .well, +[data-theme='translucent'] .panel, +[data-theme='translucent'] code, +[data-theme='translucent'] .list-group-item { + background-color: rgba(0, 0, 0, .035); +} +[data-theme='translucent'] .well, +[data-theme='translucent'] .list-group-item { + border-color: rgba(0, 0, 0, .035); +} +[data-theme='translucent'] .list-group-item.active, +[data-theme='translucent'] .list-group-item.active:focus, +[data-theme='translucent'] .list-group-item.active:hover { + background-color: #33cabb; + border-color: #33cabb; +} +[data-theme='translucent'] .form-control, +[data-theme='translucent'] div.tagsinput { + border-color: rgba(255, 255, 255, .075); + background-color: rgba(0, 0, 0, .035); + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .form-control:focus { + border-color: rgba(255, 255, 255, .35); +} +[data-theme='translucent'] .input-group-btn:first-child>.btn, +[data-theme='translucent'] .input-group-btn:first-child>.btn-group { + margin-right: 0px; +} +[data-theme='translucent'] .input-group-addon { + background-color: rgba(255, 255, 255, .075); + border-color: rgba(255, 255, 255, .075); + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .help-block { + color: rgba(255, 255, 255, .5); +} +[data-theme='translucent'] .lyear-checkbox span::before, +[data-theme='translucent'] .lyear-radio span::before, +[data-theme='translucent'] .lyear-checkbox.checkbox-grey span::before, +[data-theme='translucent'] .lyear-checkbox.radio-grey span::before, +[data-theme='translucent'] .lyear-radio.checkbox-grey span::before, +[data-theme='translucent'] .lyear-radio.radio-grey span::before { + border-color: rgba(0, 0, 0, .125); +} +[data-theme='translucent'] .lyear-checkbox.checkbox-grey span::before, +[data-theme='translucent'] .lyear-checkbox.radio-grey span::before, +[data-theme='translucent'] .lyear-radio.checkbox-grey span::before, +[data-theme='translucent'] .lyear-radio.radio-grey span::before { + background-color: rgba(235, 235, 235, .35) +} +[data-theme='translucent'] .lyear-switch.switch-outline span { + background-color: transparent; + border-color: rgba(0, 0, 0, .35); +} +[data-theme='translucent'] .lyear-switch span { + border-color: rgba(0, 0, 0, .035); + background-color: rgba(0, 0, 0, .35); +} +[data-theme='translucent'] .login-center { + background-color: rgba(0, 0, 0, .125); +} +[data-theme='translucent'] .datepicker.dropdown-menu { + color: #333; +} +[data-theme='translucent'] .irs--flat .irs-min, +[data-theme='translucent'] .irs--flat .irs-max { + background-color: rgba(0, 0, 0, .035); + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .irs--flat .irs-line { + background-color: rgba(0, 0, 0, .075); +} +[data-theme='translucent'] .irs--flat .irs-grid-text { + color: rgba(255, 255, 255, .85); +} +[data-theme='translucent'] .text-muted { + color: rgba(255, 255, 255, .5)!important; +} +[data-theme='dark'] .card-footer, +[data-theme='translucent'] .card-footer { + background-color: transparent; +} + +@media (max-width: 1024px) { + [data-theme='translucent'].lyear-layout-sidebar-close .lyear-layout-sidebar-scroll, + [data-theme='translucent'].lyear-layout-sidebar-close .sidebar-header { + background-color: rgba(0, 0, 0, .75); + } +} + +/* 颜色搭配 */ +[data-headerbg='color_2'] .lyear-layout-header, +[data-logobg='color_2'] .sidebar-header, +[data-sidebarbg='color_2'] .lyear-layout-sidebar-scroll { + background-color: #15c377; +} +[data-headerbg='color_3'] .lyear-layout-header, +[data-logobg='color_3'] .sidebar-header, +[data-sidebarbg='color_3'] .lyear-layout-sidebar-scroll { + background-color: #48b0f7; +} +[data-headerbg='color_4'] .lyear-layout-header, +[data-logobg='color_4'] .sidebar-header, +[data-sidebarbg='color_4'] .lyear-layout-sidebar-scroll { + background-color: #faa64b; +} +[data-headerbg='color_5'] .lyear-layout-header, +[data-logobg='color_5'] .sidebar-header, +[data-sidebarbg='color_5'] .lyear-layout-sidebar-scroll { + background-color: #f96868; +} +[data-headerbg='color_6'] .lyear-layout-header, +[data-logobg='color_6'] .sidebar-header, +[data-sidebarbg='color_6'] .lyear-layout-sidebar-scroll { + background-color: #926dde; +} +[data-headerbg='color_7'] .lyear-layout-header, +[data-logobg='color_7'] .sidebar-header, +[data-sidebarbg='color_7'] .lyear-layout-sidebar-scroll { + background-color: #33cabb; +} +[data-headerbg='color_8'] .lyear-layout-header, +[data-logobg='color_8'] .sidebar-header, +[data-sidebarbg='color_8'] .lyear-layout-sidebar-scroll { + background-color: #465161; +} + +[data-logobg*='color_'] .sidebar-header img, +[data-theme='dark'] .sidebar-header img, +[data-theme='translucent'] .sidebar-header img { + position: relative; + -webkit-filter: brightness(275%); + -moz-filter: brightness(275%); + -ms-filter: brightness(275%); + -o-filter: brightness(275%); + filter: brightness(275%); +} +[data-headerbg*='color_'] .lyear-layout-header, +[data-headerbg*='color_'] .lyear-layout-header .topbar-right > li > a, +[data-sidebarbg*='color_'] .lyear-layout-sidebar-scroll a, +[data-sidebarbg*='color_'] .sidebar-footer { + color: rgba(255, 255, 255, .85); +} +[data-sidebarbg*='color_'] .nav-drawer .nav-subnav > li.active > a, +[data-sidebarbg*='color_'] .nav-drawer .nav-subnav > li > a:hover { + color: #fff; +} +[data-headerbg*='color_'] .lyear-aside-toggler .lyear-toggler-bar { + background-color: #fff; +} +[data-sidebarbg*='color_'] .nav-drawer > .active > a { + border-color: rgba(255, 255, 255, .35); + background-color: rgba(255, 255, 255, .075)!important; +} +[data-sidebarbg*='color_'] .nav > li > a:hover { + background-color: rgba(255, 255, 255, .035); +} +[data-sidebarbg*='color_'] .nav-drawer > .active > a:hover, +[data-sidebarbg*='color_'] .nav-drawer > .active > a:focus, +[data-sidebarbg*='color_'] .nav-drawer > .active > a:active { + border-color: rgba(255, 255, 255, .35); +} \ No newline at end of file diff --git a/admin/fonts/materialdesignicons.eot b/admin/fonts/materialdesignicons.eot new file mode 100644 index 0000000..df4d452 Binary files /dev/null and b/admin/fonts/materialdesignicons.eot differ diff --git a/admin/fonts/materialdesignicons.svg b/admin/fonts/materialdesignicons.svg new file mode 100644 index 0000000..10eda80 --- /dev/null +++ b/admin/fonts/materialdesignicons.svg @@ -0,0 +1,6150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/admin/fonts/materialdesignicons.ttf b/admin/fonts/materialdesignicons.ttf new file mode 100644 index 0000000..69404e3 Binary files /dev/null and b/admin/fonts/materialdesignicons.ttf differ diff --git a/admin/fonts/materialdesignicons.woff b/admin/fonts/materialdesignicons.woff new file mode 100644 index 0000000..56b9a35 Binary files /dev/null and b/admin/fonts/materialdesignicons.woff differ diff --git a/admin/fonts/materialdesignicons.woff2 b/admin/fonts/materialdesignicons.woff2 new file mode 100644 index 0000000..9f0cc36 Binary files /dev/null and b/admin/fonts/materialdesignicons.woff2 differ diff --git a/admin/footer.php b/admin/footer.php new file mode 100644 index 0000000..7ef69a6 --- /dev/null +++ b/admin/footer.php @@ -0,0 +1,17 @@ + + + + + + + +close(); ?> \ No newline at end of file diff --git a/admin/group.php b/admin/group.php new file mode 100644 index 0000000..e668139 --- /dev/null +++ b/admin/group.php @@ -0,0 +1,181 @@ + +
    + +
    + +
    +
    +
    +
    +新增分组 +
    +
    +
    + +
    +
    +
    + +方式1:填写图标的URL地址,如/img/logo.pnghttp://www.xxx.com/img/logo.png
    +方式2:粘贴图标的SVG代码,查看教程
    方式3:留空使用默认图标
    +
    +
    +
    + +注意:对链接所在的分组加密后,单独设置的链接加密将会失效
    +加密后只能通过输入密码访问,使用该功能先配置加密组 +管理加密组
    +
    +
    + +
    +
    <<返回分组列表 +
    +'; +} elseif ($set == 'edit') { + $id = $_GET['id']; + $row2 = $DB->query("select * from lylme_groups where group_id='$id' limit 1"); + $row = $DB->fetch($row2); + echo '

    修改分组信息

    +
    +
    +
    +
    + +
    +
    +
    + +方式1:填写图标的URL地址,如/img/logo.pnghttp://www.xxx.com/img/logo.png
    +方式2:粘贴图标的SVG代码,查看教程
    方式3:留空使用默认图标
    +
    +
    +
    + +优先级:分组加密>链接加密
    +加密后只能通过输入密码访问,使用该功能先配置加密组 +管理加密组
    +
    +
    + +
    +
    <<返回分组列表
    '; +} elseif ($set == 'add_submit') { + $name = $_POST['group_name']; + $icon = $_POST['group_icon']; + $pwd = $_POST['group_pwd']; + $group_order = $groupsrows + 1; + if ($name == NULL) { + echo ''; + } else { + $sql = "INSERT INTO `lylme_groups` (`group_id`, `group_name`, `group_icon`,`group_order`,`group_pwd`) VALUES (NULL, '" . $name . "', '" . $icon . "', '" . $group_order . "', '" . $pwd . "')"; + if ($DB->query($sql)) { + echo ''; + exit(); + } else echo ''; + exit(); + } + echo ''; +} elseif ($set == 'edit_submit') { + $id = $_GET['id']; + $rows2 = $DB->query("select * from lylme_groups where group_id='$id' limit 1"); + $rows = $DB->fetch($rows2); + if (!$rows) echo ''; + $name = $_POST['group_name']; + $icon = $_POST['group_icon']; + $pwd = $_POST['group_pwd']; + if ($name == NULL) { + echo ''; + } else { + $sql = "UPDATE `lylme_groups` SET `group_name` = '" . $name . "', `group_icon` = '" . $icon . "',`group_pwd` = '" . $pwd . "' WHERE `lylme_groups`.`group_id` = '" . $id . "';"; + if ($DB->query($sql)) echo ''; + else echo ''; + } +} elseif ($set == 'del') { + $id = $_POST['group_id']; + $delsql1 = 'DELETE FROM `lylme_links` WHERE group_id =' . $id; + $delsql2 = 'DELETE FROM `lylme_groups` WHERE group_id=' . $id; + $DB->query($delsql1); + $DB->query($delsql2); + exit(); +} elseif ($set == 'on') { + $id = $_POST['group_id']; + $sql = "UPDATE `lylme_groups` SET `group_status` = '1' WHERE `lylme_groups`.`group_id` =" . $id; + $DB->query($sql); + exit(); +} elseif ($set == 'off') { + $id = $_POST['group_id']; + $sql = "UPDATE `lylme_groups` SET `group_status` = '0' WHERE `lylme_groups`.`group_id` =" . $id; + $DB->query($sql); + exit(); +} +elseif ($set == 'sort') { + for ($i=0; $iquery($sql); + } + exit(); +} +// elseif ($set == 'up') { +// //上移 +// $id = $_GET['id']; +// $order = $DB->get_row("SELECT `group_id`, `group_order` FROM `lylme_groups` WHERE `group_id` = ".$id.";")['group_order']; //当前排序 +// $pl = $DB->get_row("SELECT * FROM `lylme_groups` WHERE `group_order` < ".$order." ORDER BY `lylme_groups`.`group_order` DESC LIMIT 1"); //上一行 +// $DB->query("UPDATE `lylme_groups` SET `group_order` = '".$pl['group_order']."' WHERE `lylme_groups`.`group_id` = ".$id.";"); //设置为上一行的排序 +// $DB->query("UPDATE `lylme_groups` SET `group_order` = '".$order."' WHERE `lylme_groups`.`group_id` = ".$pl['group_id'].";"); //设置上一行的排序为当前行 +// echo ''; +// exit(); + +// } elseif ($set == 'down') { +// $id = $_GET['id']; +// $order = $DB->get_row("SELECT `group_id`, `group_order` FROM `lylme_groups` WHERE `group_id` = ".$id.";")['group_order']; //当前排序 +// $nl = $DB->get_row("SELECT * FROM `lylme_groups` WHERE `group_order` > ".$order." ORDER BY `lylme_groups`.`group_order` ASC LIMIT 1"); //下一行 +// $DB->query("UPDATE `lylme_groups` SET `group_order` = '".$nl['group_order']."' WHERE `lylme_groups`.`group_id` = ".$id.";"); //设置为下一行的排序 +// $DB->query("UPDATE `lylme_groups` SET `group_order` = '".$order."' WHERE `lylme_groups`.`group_id` = ".$nl['group_id'].";"); //设置下一行的排序为当前行 +// echo ''; +// exit(); +// } +else { + + +?> +
    +
    +
    +
    + + + + + +
    + + + + + + + \ No newline at end of file diff --git a/admin/head.php b/admin/head.php new file mode 100644 index 0000000..17cedd9 --- /dev/null +++ b/admin/head.php @@ -0,0 +1,124 @@ +window.location.href='./login.php';"); +?> + + + + + +<?php echo $title.' - '.$conf['title'];?> + + + + + + +
    +
    + + + + +
    + +
    + + \ No newline at end of file diff --git a/admin/help.php b/admin/help.php new file mode 100644 index 0000000..31966a2 --- /dev/null +++ b/admin/help.php @@ -0,0 +1,49 @@ + +
    + +
    + +
    +
    +
    +
    + +
    +

    SVG代码获取教程

    +
    + +

    1. 以阿里图标库为例,访问https://www.iconfont.cn/注册登录

    +

    2. 点击网站顶部的搜索,输入需要的图标名称,在出现的结果中选择适合的图标

    +

    3. 鼠标悬停在图标上,会出现三个选项,选择最下面的下载按钮

    +

    4. 可以按个人喜好选择适合的颜色及大小(一般默认即可)

    +

    5. 点击底部的复制SVG代码,粘贴到图标的编辑框内

    +

    注意:SVG代码必须以<svg 开头,粘贴到编辑框的SVG代码前面不能包含任何字符包括空格,否则将导致报错

    +
    +
    + +
    +
    +
    + +
    + +
    + +
    + +alert("无效的访问!");history.go(-1);'; +} +include './footer.php'; + + +?> \ No newline at end of file diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..e5947cd --- /dev/null +++ b/admin/index.php @@ -0,0 +1,233 @@ +"; +file_put_contents('cache.php', $content); +} +$mysqlversion=$DB->count("select VERSION()"); +function tjsj($tjname) { + if($tjname=='') { + echo '0'; + } else { + echo $tjname; + } +} +?> + +
    +
    +

    '.$update['title'].'

      '.$update['msg'].'
    '; + } + if(getver($update['version']) > getver($conf['version'])) { + echo '

    更新提示

      '.$update['update_msg'].'
    '; + } + } +} +?> +
    +
    +
    +
    +
    +

    链接数量

    +

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    今日浏览量

    +

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    昨日浏览量

    +

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    累计浏览量

    +

    +
    +
    +
    +
    +
    +
    +0) { + echo' + '; +} +?> +
    +
    +
    +
    +

    仪表盘柱状统计图

    +
    +
    + +
    +
    +
    +
    +
    +
    +

    仪表盘折线统计图

    +
    +
    + +
    +
    +
    +
    +
    +
    +

    服务器信息

    +
    +
      +
    • + PHP 版本: + +
    • +
    • + MySQL 版本: +
    • +
    • + 服务器软件: +
    • +
    • + 程序名称:六零导航页(LyLme Spage) +
    • +
    • + 建站日期: +
    • +
    • + 当前版本: 检查更新 +
    • +
    • + 最新版本: 查看更新说明 +
    • +
    • + 项目作者:六零 捐赠作者 +
    • +
    • + 项目地址:https://github.com/LyLme/lylme_spage +
    • +
    +
    +
    + + +
    + + + + + \ No newline at end of file diff --git a/admin/js/Chart.js b/admin/js/Chart.js new file mode 100644 index 0000000..6ce6278 --- /dev/null +++ b/admin/js/Chart.js @@ -0,0 +1,18962 @@ +/*! + * Chart.js + * http://chartjs.org/ + * Version: 2.7.3 + * + * Copyright 2018 Chart.js Contributors + * Released under the MIT license + * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md + */ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i lum2) { + return (lum1 + 0.05) / (lum2 + 0.05); + } + return (lum2 + 0.05) / (lum1 + 0.05); + }, + + level: function (color2) { + var contrastRatio = this.contrast(color2); + if (contrastRatio >= 7.1) { + return 'AAA'; + } + + return (contrastRatio >= 4.5) ? 'AA' : ''; + }, + + dark: function () { + // YIQ equation from http://24ways.org/2010/calculating-color-contrast + var rgb = this.values.rgb; + var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000; + return yiq < 128; + }, + + light: function () { + return !this.dark(); + }, + + negate: function () { + var rgb = []; + for (var i = 0; i < 3; i++) { + rgb[i] = 255 - this.values.rgb[i]; + } + this.setValues('rgb', rgb); + return this; + }, + + lighten: function (ratio) { + var hsl = this.values.hsl; + hsl[2] += hsl[2] * ratio; + this.setValues('hsl', hsl); + return this; + }, + + darken: function (ratio) { + var hsl = this.values.hsl; + hsl[2] -= hsl[2] * ratio; + this.setValues('hsl', hsl); + return this; + }, + + saturate: function (ratio) { + var hsl = this.values.hsl; + hsl[1] += hsl[1] * ratio; + this.setValues('hsl', hsl); + return this; + }, + + desaturate: function (ratio) { + var hsl = this.values.hsl; + hsl[1] -= hsl[1] * ratio; + this.setValues('hsl', hsl); + return this; + }, + + whiten: function (ratio) { + var hwb = this.values.hwb; + hwb[1] += hwb[1] * ratio; + this.setValues('hwb', hwb); + return this; + }, + + blacken: function (ratio) { + var hwb = this.values.hwb; + hwb[2] += hwb[2] * ratio; + this.setValues('hwb', hwb); + return this; + }, + + greyscale: function () { + var rgb = this.values.rgb; + // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale + var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; + this.setValues('rgb', [val, val, val]); + return this; + }, + + clearer: function (ratio) { + var alpha = this.values.alpha; + this.setValues('alpha', alpha - (alpha * ratio)); + return this; + }, + + opaquer: function (ratio) { + var alpha = this.values.alpha; + this.setValues('alpha', alpha + (alpha * ratio)); + return this; + }, + + rotate: function (degrees) { + var hsl = this.values.hsl; + var hue = (hsl[0] + degrees) % 360; + hsl[0] = hue < 0 ? 360 + hue : hue; + this.setValues('hsl', hsl); + return this; + }, + + /** + * Ported from sass implementation in C + * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 + */ + mix: function (mixinColor, weight) { + var color1 = this; + var color2 = mixinColor; + var p = weight === undefined ? 0.5 : weight; + + var w = 2 * p - 1; + var a = color1.alpha() - color2.alpha(); + + var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; + var w2 = 1 - w1; + + return this + .rgb( + w1 * color1.red() + w2 * color2.red(), + w1 * color1.green() + w2 * color2.green(), + w1 * color1.blue() + w2 * color2.blue() + ) + .alpha(color1.alpha() * p + color2.alpha() * (1 - p)); + }, + + toJSON: function () { + return this.rgb(); + }, + + clone: function () { + // NOTE(SB): using node-clone creates a dependency to Buffer when using browserify, + // making the final build way to big to embed in Chart.js. So let's do it manually, + // assuming that values to clone are 1 dimension arrays containing only numbers, + // except 'alpha' which is a number. + var result = new Color(); + var source = this.values; + var target = result.values; + var value, type; + + for (var prop in source) { + if (source.hasOwnProperty(prop)) { + value = source[prop]; + type = ({}).toString.call(value); + if (type === '[object Array]') { + target[prop] = value.slice(0); + } else if (type === '[object Number]') { + target[prop] = value; + } else { + console.error('unexpected color value:', value); + } + } + } + + return result; + } +}; + +Color.prototype.spaces = { + rgb: ['red', 'green', 'blue'], + hsl: ['hue', 'saturation', 'lightness'], + hsv: ['hue', 'saturation', 'value'], + hwb: ['hue', 'whiteness', 'blackness'], + cmyk: ['cyan', 'magenta', 'yellow', 'black'] +}; + +Color.prototype.maxes = { + rgb: [255, 255, 255], + hsl: [360, 100, 100], + hsv: [360, 100, 100], + hwb: [360, 100, 100], + cmyk: [100, 100, 100, 100] +}; + +Color.prototype.getValues = function (space) { + var values = this.values; + var vals = {}; + + for (var i = 0; i < space.length; i++) { + vals[space.charAt(i)] = values[space][i]; + } + + if (values.alpha !== 1) { + vals.a = values.alpha; + } + + // {r: 255, g: 255, b: 255, a: 0.4} + return vals; +}; + +Color.prototype.setValues = function (space, vals) { + var values = this.values; + var spaces = this.spaces; + var maxes = this.maxes; + var alpha = 1; + var i; + + this.valid = true; + + if (space === 'alpha') { + alpha = vals; + } else if (vals.length) { + // [10, 10, 10] + values[space] = vals.slice(0, space.length); + alpha = vals[space.length]; + } else if (vals[space.charAt(0)] !== undefined) { + // {r: 10, g: 10, b: 10} + for (i = 0; i < space.length; i++) { + values[space][i] = vals[space.charAt(i)]; + } + + alpha = vals.a; + } else if (vals[spaces[space][0]] !== undefined) { + // {red: 10, green: 10, blue: 10} + var chans = spaces[space]; + + for (i = 0; i < space.length; i++) { + values[space][i] = vals[chans[i]]; + } + + alpha = vals.alpha; + } + + values.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha))); + + if (space === 'alpha') { + return false; + } + + var capped; + + // cap values of the space prior converting all values + for (i = 0; i < space.length; i++) { + capped = Math.max(0, Math.min(maxes[space][i], values[space][i])); + values[space][i] = Math.round(capped); + } + + // convert to all the other color spaces + for (var sname in spaces) { + if (sname !== space) { + values[sname] = convert[space][sname](values[space]); + } + } + + return true; +}; + +Color.prototype.setSpace = function (space, args) { + var vals = args[0]; + + if (vals === undefined) { + // color.rgb() + return this.getValues(space); + } + + // color.rgb(10, 10, 10) + if (typeof vals === 'number') { + vals = Array.prototype.slice.call(args); + } + + this.setValues(space, vals); + return this; +}; + +Color.prototype.setChannel = function (space, index, val) { + var svalues = this.values[space]; + if (val === undefined) { + // color.red() + return svalues[index]; + } else if (val === svalues[index]) { + // color.red(color.red()) + return this; + } + + // color.red(100) + svalues[index] = val; + this.setValues(space, svalues); + + return this; +}; + +if (typeof window !== 'undefined') { + window.Color = Color; +} + +module.exports = Color; + +},{"1":1,"4":4}],3:[function(require,module,exports){ +/* MIT license */ + +module.exports = { + rgb2hsl: rgb2hsl, + rgb2hsv: rgb2hsv, + rgb2hwb: rgb2hwb, + rgb2cmyk: rgb2cmyk, + rgb2keyword: rgb2keyword, + rgb2xyz: rgb2xyz, + rgb2lab: rgb2lab, + rgb2lch: rgb2lch, + + hsl2rgb: hsl2rgb, + hsl2hsv: hsl2hsv, + hsl2hwb: hsl2hwb, + hsl2cmyk: hsl2cmyk, + hsl2keyword: hsl2keyword, + + hsv2rgb: hsv2rgb, + hsv2hsl: hsv2hsl, + hsv2hwb: hsv2hwb, + hsv2cmyk: hsv2cmyk, + hsv2keyword: hsv2keyword, + + hwb2rgb: hwb2rgb, + hwb2hsl: hwb2hsl, + hwb2hsv: hwb2hsv, + hwb2cmyk: hwb2cmyk, + hwb2keyword: hwb2keyword, + + cmyk2rgb: cmyk2rgb, + cmyk2hsl: cmyk2hsl, + cmyk2hsv: cmyk2hsv, + cmyk2hwb: cmyk2hwb, + cmyk2keyword: cmyk2keyword, + + keyword2rgb: keyword2rgb, + keyword2hsl: keyword2hsl, + keyword2hsv: keyword2hsv, + keyword2hwb: keyword2hwb, + keyword2cmyk: keyword2cmyk, + keyword2lab: keyword2lab, + keyword2xyz: keyword2xyz, + + xyz2rgb: xyz2rgb, + xyz2lab: xyz2lab, + xyz2lch: xyz2lch, + + lab2xyz: lab2xyz, + lab2rgb: lab2rgb, + lab2lch: lab2lch, + + lch2lab: lch2lab, + lch2xyz: lch2xyz, + lch2rgb: lch2rgb +} + + +function rgb2hsl(rgb) { + var r = rgb[0]/255, + g = rgb[1]/255, + b = rgb[2]/255, + min = Math.min(r, g, b), + max = Math.max(r, g, b), + delta = max - min, + h, s, l; + + if (max == min) + h = 0; + else if (r == max) + h = (g - b) / delta; + else if (g == max) + h = 2 + (b - r) / delta; + else if (b == max) + h = 4 + (r - g)/ delta; + + h = Math.min(h * 60, 360); + + if (h < 0) + h += 360; + + l = (min + max) / 2; + + if (max == min) + s = 0; + else if (l <= 0.5) + s = delta / (max + min); + else + s = delta / (2 - max - min); + + return [h, s * 100, l * 100]; +} + +function rgb2hsv(rgb) { + var r = rgb[0], + g = rgb[1], + b = rgb[2], + min = Math.min(r, g, b), + max = Math.max(r, g, b), + delta = max - min, + h, s, v; + + if (max == 0) + s = 0; + else + s = (delta/max * 1000)/10; + + if (max == min) + h = 0; + else if (r == max) + h = (g - b) / delta; + else if (g == max) + h = 2 + (b - r) / delta; + else if (b == max) + h = 4 + (r - g) / delta; + + h = Math.min(h * 60, 360); + + if (h < 0) + h += 360; + + v = ((max / 255) * 1000) / 10; + + return [h, s, v]; +} + +function rgb2hwb(rgb) { + var r = rgb[0], + g = rgb[1], + b = rgb[2], + h = rgb2hsl(rgb)[0], + w = 1/255 * Math.min(r, Math.min(g, b)), + b = 1 - 1/255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +} + +function rgb2cmyk(rgb) { + var r = rgb[0] / 255, + g = rgb[1] / 255, + b = rgb[2] / 255, + c, m, y, k; + + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + return [c * 100, m * 100, y * 100, k * 100]; +} + +function rgb2keyword(rgb) { + return reverseKeywords[JSON.stringify(rgb)]; +} + +function rgb2xyz(rgb) { + var r = rgb[0] / 255, + g = rgb[1] / 255, + b = rgb[2] / 255; + + // assume sRGB + r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); + g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); + b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); + + var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y *100, z * 100]; +} + +function rgb2lab(rgb) { + var xyz = rgb2xyz(rgb), + x = xyz[0], + y = xyz[1], + z = xyz[2], + l, a, b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +} + +function rgb2lch(args) { + return lab2lch(rgb2lab(args)); +} + +function hsl2rgb(hsl) { + var h = hsl[0] / 360, + s = hsl[1] / 100, + l = hsl[2] / 100, + t1, t2, t3, rgb, val; + + if (s == 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) + t2 = l * (1 + s); + else + t2 = l + s - l * s; + t1 = 2 * l - t2; + + rgb = [0, 0, 0]; + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * - (i - 1); + t3 < 0 && t3++; + t3 > 1 && t3--; + + if (6 * t3 < 1) + val = t1 + (t2 - t1) * 6 * t3; + else if (2 * t3 < 1) + val = t2; + else if (3 * t3 < 2) + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + else + val = t1; + + rgb[i] = val * 255; + } + + return rgb; +} + +function hsl2hsv(hsl) { + var h = hsl[0], + s = hsl[1] / 100, + l = hsl[2] / 100, + sv, v; + + if(l === 0) { + // no need to do calc on black + // also avoids divide by 0 error + return [0, 0, 0]; + } + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + v = (l + s) / 2; + sv = (2 * s) / (l + s); + return [h, sv * 100, v * 100]; +} + +function hsl2hwb(args) { + return rgb2hwb(hsl2rgb(args)); +} + +function hsl2cmyk(args) { + return rgb2cmyk(hsl2rgb(args)); +} + +function hsl2keyword(args) { + return rgb2keyword(hsl2rgb(args)); +} + + +function hsv2rgb(hsv) { + var h = hsv[0] / 60, + s = hsv[1] / 100, + v = hsv[2] / 100, + hi = Math.floor(h) % 6; + + var f = h - Math.floor(h), + p = 255 * v * (1 - s), + q = 255 * v * (1 - (s * f)), + t = 255 * v * (1 - (s * (1 - f))), + v = 255 * v; + + switch(hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +} + +function hsv2hsl(hsv) { + var h = hsv[0], + s = hsv[1] / 100, + v = hsv[2] / 100, + sl, l; + + l = (2 - s) * v; + sl = s * v; + sl /= (l <= 1) ? l : 2 - l; + sl = sl || 0; + l /= 2; + return [h, sl * 100, l * 100]; +} + +function hsv2hwb(args) { + return rgb2hwb(hsv2rgb(args)) +} + +function hsv2cmyk(args) { + return rgb2cmyk(hsv2rgb(args)); +} + +function hsv2keyword(args) { + return rgb2keyword(hsv2rgb(args)); +} + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +function hwb2rgb(hwb) { + var h = hwb[0] / 360, + wh = hwb[1] / 100, + bl = hwb[2] / 100, + ratio = wh + bl, + i, v, f, n; + + // wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + if ((i & 0x01) != 0) { + f = 1 - f; + } + n = wh + f * (v - wh); // linear interpolation + + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + + return [r * 255, g * 255, b * 255]; +} + +function hwb2hsl(args) { + return rgb2hsl(hwb2rgb(args)); +} + +function hwb2hsv(args) { + return rgb2hsv(hwb2rgb(args)); +} + +function hwb2cmyk(args) { + return rgb2cmyk(hwb2rgb(args)); +} + +function hwb2keyword(args) { + return rgb2keyword(hwb2rgb(args)); +} + +function cmyk2rgb(cmyk) { + var c = cmyk[0] / 100, + m = cmyk[1] / 100, + y = cmyk[2] / 100, + k = cmyk[3] / 100, + r, g, b; + + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + return [r * 255, g * 255, b * 255]; +} + +function cmyk2hsl(args) { + return rgb2hsl(cmyk2rgb(args)); +} + +function cmyk2hsv(args) { + return rgb2hsv(cmyk2rgb(args)); +} + +function cmyk2hwb(args) { + return rgb2hwb(cmyk2rgb(args)); +} + +function cmyk2keyword(args) { + return rgb2keyword(cmyk2rgb(args)); +} + + +function xyz2rgb(xyz) { + var x = xyz[0] / 100, + y = xyz[1] / 100, + z = xyz[2] / 100, + r, g, b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // assume sRGB + r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) + : r = (r * 12.92); + + g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) + : g = (g * 12.92); + + b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) + : b = (b * 12.92); + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +} + +function xyz2lab(xyz) { + var x = xyz[0], + y = xyz[1], + z = xyz[2], + l, a, b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +} + +function xyz2lch(args) { + return lab2lch(xyz2lab(args)); +} + +function lab2xyz(lab) { + var l = lab[0], + a = lab[1], + b = lab[2], + x, y, z, y2; + + if (l <= 8) { + y = (l * 100) / 903.3; + y2 = (7.787 * (y / 100)) + (16 / 116); + } else { + y = 100 * Math.pow((l + 16) / 116, 3); + y2 = Math.pow(y / 100, 1/3); + } + + x = x / 95.047 <= 0.008856 ? x = (95.047 * ((a / 500) + y2 - (16 / 116))) / 7.787 : 95.047 * Math.pow((a / 500) + y2, 3); + + z = z / 108.883 <= 0.008859 ? z = (108.883 * (y2 - (b / 200) - (16 / 116))) / 7.787 : 108.883 * Math.pow(y2 - (b / 200), 3); + + return [x, y, z]; +} + +function lab2lch(lab) { + var l = lab[0], + a = lab[1], + b = lab[2], + hr, h, c; + + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + if (h < 0) { + h += 360; + } + c = Math.sqrt(a * a + b * b); + return [l, c, h]; +} + +function lab2rgb(args) { + return xyz2rgb(lab2xyz(args)); +} + +function lch2lab(lch) { + var l = lch[0], + c = lch[1], + h = lch[2], + a, b, hr; + + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + return [l, a, b]; +} + +function lch2xyz(args) { + return lab2xyz(lch2lab(args)); +} + +function lch2rgb(args) { + return lab2rgb(lch2lab(args)); +} + +function keyword2rgb(keyword) { + return cssKeywords[keyword]; +} + +function keyword2hsl(args) { + return rgb2hsl(keyword2rgb(args)); +} + +function keyword2hsv(args) { + return rgb2hsv(keyword2rgb(args)); +} + +function keyword2hwb(args) { + return rgb2hwb(keyword2rgb(args)); +} + +function keyword2cmyk(args) { + return rgb2cmyk(keyword2rgb(args)); +} + +function keyword2lab(args) { + return rgb2lab(keyword2rgb(args)); +} + +function keyword2xyz(args) { + return rgb2xyz(keyword2rgb(args)); +} + +var cssKeywords = { + aliceblue: [240,248,255], + antiquewhite: [250,235,215], + aqua: [0,255,255], + aquamarine: [127,255,212], + azure: [240,255,255], + beige: [245,245,220], + bisque: [255,228,196], + black: [0,0,0], + blanchedalmond: [255,235,205], + blue: [0,0,255], + blueviolet: [138,43,226], + brown: [165,42,42], + burlywood: [222,184,135], + cadetblue: [95,158,160], + chartreuse: [127,255,0], + chocolate: [210,105,30], + coral: [255,127,80], + cornflowerblue: [100,149,237], + cornsilk: [255,248,220], + crimson: [220,20,60], + cyan: [0,255,255], + darkblue: [0,0,139], + darkcyan: [0,139,139], + darkgoldenrod: [184,134,11], + darkgray: [169,169,169], + darkgreen: [0,100,0], + darkgrey: [169,169,169], + darkkhaki: [189,183,107], + darkmagenta: [139,0,139], + darkolivegreen: [85,107,47], + darkorange: [255,140,0], + darkorchid: [153,50,204], + darkred: [139,0,0], + darksalmon: [233,150,122], + darkseagreen: [143,188,143], + darkslateblue: [72,61,139], + darkslategray: [47,79,79], + darkslategrey: [47,79,79], + darkturquoise: [0,206,209], + darkviolet: [148,0,211], + deeppink: [255,20,147], + deepskyblue: [0,191,255], + dimgray: [105,105,105], + dimgrey: [105,105,105], + dodgerblue: [30,144,255], + firebrick: [178,34,34], + floralwhite: [255,250,240], + forestgreen: [34,139,34], + fuchsia: [255,0,255], + gainsboro: [220,220,220], + ghostwhite: [248,248,255], + gold: [255,215,0], + goldenrod: [218,165,32], + gray: [128,128,128], + green: [0,128,0], + greenyellow: [173,255,47], + grey: [128,128,128], + honeydew: [240,255,240], + hotpink: [255,105,180], + indianred: [205,92,92], + indigo: [75,0,130], + ivory: [255,255,240], + khaki: [240,230,140], + lavender: [230,230,250], + lavenderblush: [255,240,245], + lawngreen: [124,252,0], + lemonchiffon: [255,250,205], + lightblue: [173,216,230], + lightcoral: [240,128,128], + lightcyan: [224,255,255], + lightgoldenrodyellow: [250,250,210], + lightgray: [211,211,211], + lightgreen: [144,238,144], + lightgrey: [211,211,211], + lightpink: [255,182,193], + lightsalmon: [255,160,122], + lightseagreen: [32,178,170], + lightskyblue: [135,206,250], + lightslategray: [119,136,153], + lightslategrey: [119,136,153], + lightsteelblue: [176,196,222], + lightyellow: [255,255,224], + lime: [0,255,0], + limegreen: [50,205,50], + linen: [250,240,230], + magenta: [255,0,255], + maroon: [128,0,0], + mediumaquamarine: [102,205,170], + mediumblue: [0,0,205], + mediumorchid: [186,85,211], + mediumpurple: [147,112,219], + mediumseagreen: [60,179,113], + mediumslateblue: [123,104,238], + mediumspringgreen: [0,250,154], + mediumturquoise: [72,209,204], + mediumvioletred: [199,21,133], + midnightblue: [25,25,112], + mintcream: [245,255,250], + mistyrose: [255,228,225], + moccasin: [255,228,181], + navajowhite: [255,222,173], + navy: [0,0,128], + oldlace: [253,245,230], + olive: [128,128,0], + olivedrab: [107,142,35], + orange: [255,165,0], + orangered: [255,69,0], + orchid: [218,112,214], + palegoldenrod: [238,232,170], + palegreen: [152,251,152], + paleturquoise: [175,238,238], + palevioletred: [219,112,147], + papayawhip: [255,239,213], + peachpuff: [255,218,185], + peru: [205,133,63], + pink: [255,192,203], + plum: [221,160,221], + powderblue: [176,224,230], + purple: [128,0,128], + rebeccapurple: [102, 51, 153], + red: [255,0,0], + rosybrown: [188,143,143], + royalblue: [65,105,225], + saddlebrown: [139,69,19], + salmon: [250,128,114], + sandybrown: [244,164,96], + seagreen: [46,139,87], + seashell: [255,245,238], + sienna: [160,82,45], + silver: [192,192,192], + skyblue: [135,206,235], + slateblue: [106,90,205], + slategray: [112,128,144], + slategrey: [112,128,144], + snow: [255,250,250], + springgreen: [0,255,127], + steelblue: [70,130,180], + tan: [210,180,140], + teal: [0,128,128], + thistle: [216,191,216], + tomato: [255,99,71], + turquoise: [64,224,208], + violet: [238,130,238], + wheat: [245,222,179], + white: [255,255,255], + whitesmoke: [245,245,245], + yellow: [255,255,0], + yellowgreen: [154,205,50] +}; + +var reverseKeywords = {}; +for (var key in cssKeywords) { + reverseKeywords[JSON.stringify(cssKeywords[key])] = key; +} + +},{}],4:[function(require,module,exports){ +var conversions = require(3); + +var convert = function() { + return new Converter(); +} + +for (var func in conversions) { + // export Raw versions + convert[func + "Raw"] = (function(func) { + // accept array or plain args + return function(arg) { + if (typeof arg == "number") + arg = Array.prototype.slice.call(arguments); + return conversions[func](arg); + } + })(func); + + var pair = /(\w+)2(\w+)/.exec(func), + from = pair[1], + to = pair[2]; + + // export rgb2hsl and ["rgb"]["hsl"] + convert[from] = convert[from] || {}; + + convert[from][to] = convert[func] = (function(func) { + return function(arg) { + if (typeof arg == "number") + arg = Array.prototype.slice.call(arguments); + + var val = conversions[func](arg); + if (typeof val == "string" || val === undefined) + return val; // keyword + + for (var i = 0; i < val.length; i++) + val[i] = Math.round(val[i]); + return val; + } + })(func); +} + + +/* Converter does lazy conversion and caching */ +var Converter = function() { + this.convs = {}; +}; + +/* Either get the values for a space or + set the values for a space, depending on args */ +Converter.prototype.routeSpace = function(space, args) { + var values = args[0]; + if (values === undefined) { + // color.rgb() + return this.getValues(space); + } + // color.rgb(10, 10, 10) + if (typeof values == "number") { + values = Array.prototype.slice.call(args); + } + + return this.setValues(space, values); +}; + +/* Set the values for a space, invalidating cache */ +Converter.prototype.setValues = function(space, values) { + this.space = space; + this.convs = {}; + this.convs[space] = values; + return this; +}; + +/* Get the values for a space. If there's already + a conversion for the space, fetch it, otherwise + compute it */ +Converter.prototype.getValues = function(space) { + var vals = this.convs[space]; + if (!vals) { + var fspace = this.space, + from = this.convs[fspace]; + vals = convert[fspace][space](from); + + this.convs[space] = vals; + } + return vals; +}; + +["rgb", "hsl", "hsv", "cmyk", "keyword"].forEach(function(space) { + Converter.prototype[space] = function(vals) { + return this.routeSpace(space, arguments); + } +}); + +module.exports = convert; +},{"3":3}],5:[function(require,module,exports){ +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; + +},{}],6:[function(require,module,exports){ +//! moment.js + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + global.moment = factory() +}(this, (function () { 'use strict'; + + var hookCallback; + + function hooks () { + return hookCallback.apply(null, arguments); + } + + // This is done to register the method called with moment() + // without creating circular dependencies. + function setHookCallback (callback) { + hookCallback = callback; + } + + function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; + } + + function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; + } + + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return (Object.getOwnPropertyNames(obj).length === 0); + } else { + var k; + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + return true; + } + } + + function isUndefined(input) { + return input === void 0; + } + + function isNumber(input) { + return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; + } + + function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; + } + + function map(arr, fn) { + var res = [], i; + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + return res; + } + + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; + } + + function createUTC (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty : false, + unusedTokens : [], + unusedInput : [], + overflow : -2, + charsLeftOver : 0, + nullInput : false, + invalidMonth : null, + invalidFormat : false, + userInvalidated : false, + iso : false, + parsedDateParts : [], + meridiem : null, + rfc2822 : false, + weekdayMismatch : false + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + return m._pf; + } + + var some; + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && + flags.overflow < 0 && + !flags.empty && + !flags.invalidMonth && + !flags.invalidWeekday && + !flags.weekdayMismatch && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated && + (!flags.meridiem || (flags.meridiem && parsedParts)); + + if (m._strict) { + isNowValid = isNowValid && + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } + else { + return isNowValid; + } + } + return m._isValid; + } + + function createInvalid (flags) { + var m = createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m), flags); + } + else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } + + // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + var momentProperties = hooks.momentProperties = []; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + if (!isUndefined(from._i)) { + to._i = from._i; + } + if (!isUndefined(from._f)) { + to._f = from._f; + } + if (!isUndefined(from._l)) { + to._l = from._l; + } + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; + + // Moment prototype object + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + if (!this.isValid()) { + this._d = new Date(NaN); + } + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment (obj) { + return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); + } + + function absFloor (number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } + + // compare two arrays, return the number of differences + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ((dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { + diffs++; + } + } + return diffs + lengthDiff; + } + + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && + (typeof console !== 'undefined') && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + if (firstTime) { + var args = []; + var arg; + for (var i = 0; i < arguments.length; i++) { + arg = ''; + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + args.push(arg); + } + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function set (config) { + var prop, i; + for (i in config) { + prop = config[i]; + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + this._config = config; + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + + '|' + (/\d{1,2}/).source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && + !hasOwnProp(childConfig, prop) && + isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, res = []; + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + return res; + }; + } + + var defaultCalendar = { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }; + + function calendar (key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS : 'h:mm:ss A', + LT : 'h:mm A', + L : 'MM/DD/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY h:mm A', + LLLL : 'dddd, MMMM D, YYYY h:mm A' + }; + + function longDateFormat (key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate () { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal (number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }; + + function relativeTime (number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return (isFunction(output)) ? + output(number, withoutSuffix, string, isFuture) : + output.replace(/%d/i, number); + } + + function pastFuture (diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias (unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + for (var u in unitsObj) { + units.push({unit: u, priority: priorities[u]}); + } + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? (forceSign ? '+' : '') : '-') + + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + + var formatFunctions = {}; + + var formatTokenFunctions = {}; + + // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + function addFormatToken (token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), i, length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', i; + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } + return output; + }; + } + + // format date using native date object + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var match1 = /\d/; // 0 - 9 + var match2 = /\d\d/; // 00 - 99 + var match3 = /\d{3}/; // 000 - 999 + var match4 = /\d{4}/; // 0000 - 9999 + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + var match1to2 = /\d\d?/; // 0 - 99 + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + var match1to3 = /\d{1,3}/; // 0 - 999 + var match1to4 = /\d{1,4}/; // 0 - 9999 + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + + var regexes = {}; + + function addRegexToken (token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return (isStrict && strictRegex) ? strictRegex : regex; + }; + } + + function getParseRegexForToken (token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } + + // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken (token, callback) { + var i, func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken (token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; + + // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); + + // ALIASES + + addUnitAlias('year', 'y'); + + // PRIORITIES + + addUnitPriority('year', 1); + + // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); + + // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + } + + // HOOKS + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; + + // MOMENTS + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear () { + return isLeapYear(this.year()); + } + + function makeGetSet (unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get (mom, unit) { + return mom.isValid() ? + mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; + } + + function set$1 (mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } + else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } + + // MOMENTS + + function stringGet (units) { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](); + } + return this; + } + + + function stringSet (units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](value); + } + } + return this; + } + + function mod(n, x) { + return ((n % x) + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2); + } + + // FORMATTING + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); + + // ALIASES + + addUnitAlias('month', 'M'); + + // PRIORITY + + addUnitPriority('month', 8); + + // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); + + // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + function localeMonths (m, format) { + if (!m) { + return isArray(this._months) ? this._months : + this._months['standalone']; + } + return isArray(this._months) ? this._months[m.month()] : + this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + function localeMonthsShort (m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : + this._monthsShort['standalone']; + } + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : + this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, ii, mom, llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse (monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } + + // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } + + // MOMENTS + + function setMonth (mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; + } + + function getSetMonth (value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth () { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + function monthsShortRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + return this._monthsShortStrictRegex && isStrict ? + this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + function monthsRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + return this._monthsStrictRegex && isStrict ? + this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], longPieces = [], mixedPieces = [], + i, mom; + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } + // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + } + + function createDate (y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date = new Date(y, m, d, h, M, s, ms); + + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { + date.setFullYear(y); + } + return date; + } + + function createUTCDate (y) { + var date = new Date(Date.UTC.apply(null, arguments)); + + // the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + return date; + } + + // start-of-first-week - start-of-year + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + + return -fwdlw + fwd - 1; + } + + // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } + + // FORMATTING + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + + // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); + + // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); + + // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // LOCALES + + function localeWeek (mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 1st is the first week of the year. + }; + + function localeFirstDayOfWeek () { + return this._week.dow; + } + + function localeFirstDayOfYear () { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek (input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek (input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + // FORMATTING + + addFormatToken('d', 0, 'do', 'day'); + + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); + + // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); + + // PRIORITY + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); + + // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); + + // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; + } + + // LOCALES + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + function localeWeekdays (m, format) { + if (!m) { + return isArray(this._weekdays) ? this._weekdays : + this._weekdays['standalone']; + } + return isArray(this._weekdays) ? this._weekdays[m.day()] : + this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + function localeWeekdaysShort (m) { + return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + function localeWeekdaysMin (m) { + return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse (weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + + mom = createUTC([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); + } + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } + + // MOMENTS + + function getSetDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + function weekdaysRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + return this._weekdaysStrictRegex && isStrict ? + this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + function weekdaysShortRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict ? + this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + function weekdaysMinRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict ? + this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + + + function computeWeekdaysParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], + i, mom, minp, shortp, longp; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } + + // FORMATTING + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); + }); + + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); + }); + + function meridiem (token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); + + // ALIASES + + addUnitAlias('hour', 'h'); + + // PRIORITY + addUnitPriority('hour', 13); + + // PARSING + + function matchMeridiem (isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); + + // LOCALES + + function localeIsPM (input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return ((input + '').toLowerCase().charAt(0) === 'p'); + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + function localeMeridiem (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } + + + // MOMENTS + + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + var getSetHour = makeGetSet('Hours', true); + + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + + week: defaultLocaleWeek, + + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + + meridiemParse: defaultLocaleMeridiemParse + }; + + // internal storage for locale config files + var locales = {}; + var localeFamilies = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } + + // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + function chooseLocale(names) { + var i = 0, j, next, locale, split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; + } + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null; + // TODO: Find a better way to register and load all the locales in Node + if (!locales[name] && (typeof module !== 'undefined') && + module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = require; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + return locales[name]; + } + + // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + function getSetGlobalLocale (key, values) { + var data; + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } + else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } + else { + if ((typeof console !== 'undefined') && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale (name, config) { + if (config !== null) { + var locale, parentConfig = baseConfig; + config.abbr = name; + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale ' + + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + } + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } + + // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + getSetGlobalLocale(name); + + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, tmpLocale, parentConfig = baseConfig; + // MERGE + tmpLocale = loadLocale(name); + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + + // backwards compat for now: also set the locale + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; + } + + // returns locale data + function getLocale (key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; + } + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow (m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : + a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : + a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : + a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : + a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : + a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : + -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } + + // Pick the first defined of two or three arguments. + function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } + + // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + function configFromArray (config) { + var i, date, input = [], currentDate, expectedWeekday, yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); + + //compute day of the year from weeks and weekdays + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } + + //if the day of the year is set, figure out what it is + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } + + // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } + + // Zero out whatever was not defaulted, including time + for (; i < 7; i++) { + config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; + } + + // Check for 24:00:00.000 + if (config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); + + // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } + + // check for mismatching day of week + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; + + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + + var curWeek = weekOfYear(createLocal(), dow, doy); + + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); + + // Default to current week. + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from begining of week + weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to begining of week + weekday = dow; + } + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } + + // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + + var isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/] + ]; + + // iso time formats and regexes + var isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/] + ]; + + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; + + // date from iso format + function configFromISO(config) { + var i, l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, dateFormat, timeFormat, tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } + + // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; + + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [ + untruncateYear(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10) + ]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + return true; + } + + var obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, h = (hm - m) / 100; + return h * 60 + m; + } + } + + // date and time from ref 2822 format + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + + config._d = createUTCDate.apply(null, config._a); + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } + + // date from iso format or fallback + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + // Final attempt, use Input Fallback + hooks.createFromInputFallback(config); + } + + hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + + 'discouraged and will be removed in an upcoming major release. Please refer to ' + + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + } + ); + + // constant that refers to the ISO standard + hooks.ISO_8601 = function () {}; + + // constant that refers to the RFC 2822 form + hooks.RFC_2822 = function () {}; + + // date from string and format string + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + config._a = []; + getParsingFlags(config).empty = true; + + // This array is used to make a Date, either with `new Date` or `Date.UTC` + var string = '' + config._i, + i, parsedInput, tokens, token, skipped, + stringLength = string.length, + totalParsedInputLength = 0; + + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; + // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } + // don't parse if it's not a known token + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } + else { + getParsingFlags(config).unusedTokens.push(token); + } + addTimeToArrayFromToken(token, parsedInput, config); + } + else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } + + // add remaining unparsed input length to the string + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } + + // clear _12h flag if hour is <= 12 + if (config._a[HOUR] <= 12 && + getParsingFlags(config).bigHour === true && + config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; + // handle meridiem + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + + configFromArray(config); + checkOverflow(config); + } + + + function meridiemFixWrap (locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } + } + + // date from string and array of format strings + function configFromStringAndArray(config) { + var tempConfig, + bestMoment, + + scoreToBeat, + i, + currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } + + // if there is any input that was not parsed add a penalty for that format + currentScore += getParsingFlags(tempConfig).charsLeftOver; + + //or tokens + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + + configFromArray(config); + } + + function createFromConfig (config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig (config) { + var input = config._i, + format = config._f; + + config._locale = config._locale || getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return createInvalid({nullInput: true}); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC (input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if ((isObject(input) && isObjectEmpty(input)) || + (isArray(input) && input.length === 0)) { + input = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + + return createFromConfig(c); + } + + function createLocal (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + } + ); + + var prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + } + ); + + // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + return res; + } + + // TODO: Use [].sort instead? + function min () { + var args = [].slice.call(arguments, 0); + + return pickBy('isBefore', args); + } + + function max () { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +(new Date()); + }; + + var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + + function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration (duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + + this._isValid = isDurationValid(normalizedInput); + + // representation for dateAddRemove + this._milliseconds = +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + + weeks * 7; + // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + + quarters * 3 + + years * 12; + + this._data = {}; + + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration (obj) { + return obj instanceof Duration; + } + + function absRound (number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } + + // FORMATTING + + function offset (token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); + + // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); + + // HELPERS + + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + + return minutes === 0 ? + 0 : + parts[0] === '+' ? minutes : -minutes; + } + + // Return a moment from input, that is local/utc/zone equivalent to model. + function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); + // Use low-level api, because this fn is low-level api. + res._d.setTime(res._d.valueOf() + diff); + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset (m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } + + // HOOKS + + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + hooks.updateOffset = function () {}; + + // MOMENTS + + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + function getSetOffset (input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone (input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC (keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal (keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + return this; + } + + function setOffsetToParsedOffset () { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + if (tZone != null) { + this.utcOffset(tZone); + } + else { + this.utcOffset(0, true); + } + } + return this; + } + + function hasAlignedHourOffset (input) { + if (!this.isValid()) { + return false; + } + input = input ? createLocal(input).utcOffset() : 0; + + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime () { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); + } + + function isDaylightSavingTimeShifted () { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && + compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal () { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset () { + return this.isValid() ? this._isUTC : false; + } + + function isUtc () { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } + + // ASP.NET json date format regex + var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; + + // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration (input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms : input._milliseconds, + d : input._days, + M : input._months + }; + } else if (isNumber(input)) { + duration = {}; + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : 0, + d : toInt(match[DATE]) * sign, + h : toInt(match[HOUR]) * sign, + m : toInt(match[MINUTE]) * sign, + s : toInt(match[SECOND]) * sign, + ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1; + duration = { + y : parseIso(match[2], sign), + M : parseIso(match[3], sign), + w : parseIso(match[4], sign), + d : parseIso(match[5], sign), + h : parseIso(match[6], sign), + m : parseIso(match[7], sign), + s : parseIso(match[8], sign) + }; + } else if (duration == null) {// checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso (inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {milliseconds: 0, months: 0}; + + res.months = other.month() - base.month() + + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +(base.clone().add(res.months, 'M')); + + return res; + } + + function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return {milliseconds: 0, months: 0}; + } + + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } + + // TODO: remove 'name' arg after deprecation is removed + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; val = period; period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract (mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'); + var subtract = createAdder(-1, 'subtract'); + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : + diff < -1 ? 'lastWeek' : + diff < 0 ? 'lastDay' : + diff < 1 ? 'sameDay' : + diff < 2 ? 'nextDay' : + diff < 7 ? 'nextWeek' : 'sameElse'; + } + + function calendar$1 (time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); + } + + function clone () { + return new Moment(this); + } + + function isAfter (input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore (input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween (from, to, units, inclusivity) { + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) && + (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units)); + } + + function isSame (input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units || 'millisecond'); + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } + } + + function isSameOrAfter (input, units) { + return this.isSame(input, units) || this.isAfter(input,units); + } + + function isSameOrBefore (input, units) { + return this.isSame(input, units) || this.isBefore(input,units); + } + + function diff (input, units, asFloat) { + var that, + zoneDelta, + output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + + units = normalizeUnits(units); + + switch (units) { + case 'year': output = monthDiff(this, that) / 12; break; + case 'month': output = monthDiff(this, that); break; + case 'quarter': output = monthDiff(this, that) / 3; break; + case 'second': output = (this - that) / 1e3; break; // 1000 + case 'minute': output = (this - that) / 6e4; break; // 1000 * 60 + case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60 + case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst + case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst + default: output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff (a, b) { + // difference in months + var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); + } + + //check for negative zero, return zero if negative zero + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString () { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); + } + } + return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + function inspect () { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + var func = 'moment'; + var zone = ''; + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + var prefix = '[' + func + '("]'; + var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + + return this.format(prefix + year + datetime + suffix); + } + + function format (inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from (time, withoutSuffix) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + createLocal(time).isValid())) { + return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow (withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to (time, withoutSuffix) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + createLocal(time).isValid())) { + return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow (withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } + + // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + function locale (key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } + } + + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } + ); + + function localeData () { + return this._locale; + } + + function startOf (units) { + units = normalizeUnits(units); + // the following switch intentionally omits break keywords + // to utilize falling through the cases. + switch (units) { + case 'year': + this.month(0); + /* falls through */ + case 'quarter': + case 'month': + this.date(1); + /* falls through */ + case 'week': + case 'isoWeek': + case 'day': + case 'date': + this.hours(0); + /* falls through */ + case 'hour': + this.minutes(0); + /* falls through */ + case 'minute': + this.seconds(0); + /* falls through */ + case 'second': + this.milliseconds(0); + } + + // weeks are a special case + if (units === 'week') { + this.weekday(0); + } + if (units === 'isoWeek') { + this.isoWeekday(1); + } + + // quarters are also special + if (units === 'quarter') { + this.month(Math.floor(this.month() / 3) * 3); + } + + return this; + } + + function endOf (units) { + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond') { + return this; + } + + // 'date' is an alias for 'day', so it should be considered as such. + if (units === 'date') { + units = 'day'; + } + + return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); + } + + function valueOf () { + return this._d.valueOf() - ((this._offset || 0) * 60000); + } + + function unix () { + return Math.floor(this.valueOf() / 1000); + } + + function toDate () { + return new Date(this.valueOf()); + } + + function toArray () { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } + + function toObject () { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; + } + + function toJSON () { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2 () { + return isValid(this); + } + + function parsingFlags () { + return extend({}, getParsingFlags(this)); + } + + function invalidAt () { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } + + // FORMATTING + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken (token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); + + // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); + + // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); + + + // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); + + // MOMENTS + + function getSetWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy); + } + + function getSetISOWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + + function getISOWeeksInYear () { + return weeksInYear(this.year(), 1, 4); + } + + function getWeeksInYear () { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } + + // FORMATTING + + addFormatToken('Q', 0, 'Qo', 'quarter'); + + // ALIASES + + addUnitAlias('quarter', 'Q'); + + // PRIORITY + + addUnitPriority('quarter', 7); + + // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); + + // MOMENTS + + function getSetQuarter (input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } + + // FORMATTING + + addFormatToken('D', ['DD', 2], 'Do', 'date'); + + // ALIASES + + addUnitAlias('date', 'D'); + + // PRIORITY + addUnitPriority('date', 9); + + // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? + (locale._dayOfMonthOrdinalParse || locale._ordinalParse) : + locale._dayOfMonthOrdinalParseLenient; + }); + + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); + + // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); + + // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + + // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); + + // PRIORITY + addUnitPriority('dayOfYear', 4); + + // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); + + // HELPERS + + // MOMENTS + + function getSetDayOfYear (input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); + } + + // FORMATTING + + addFormatToken('m', ['mm', 2], 0, 'minute'); + + // ALIASES + + addUnitAlias('minute', 'm'); + + // PRIORITY + + addUnitPriority('minute', 14); + + // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); + + // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); + + // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); + + // ALIASES + + addUnitAlias('second', 's'); + + // PRIORITY + + addUnitPriority('second', 15); + + // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); + + // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); + + // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); + + + // ALIASES + + addUnitAlias('millisecond', 'ms'); + + // PRIORITY + + addUnitPriority('millisecond', 16); + + // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + + var token; + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } + // MOMENTS + + var getSetMillisecond = makeGetSet('Milliseconds', false); + + // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); + + // MOMENTS + + function getZoneAbbr () { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName () { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); + proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + + function createUnix (input) { + return createLocal(input * 1000); + } + + function createInZone () { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat (string) { + return string; + } + + var proto$1 = Locale.prototype; + + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1 (format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl (format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + return out; + } + + // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + function listWeekdaysImpl (localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + return out; + } + + function listMonths (format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort (format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (toInt(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } + }); + + // Side effect imports + + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); + hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + + var mathAbs = Math.abs; + + function abs () { + var data = this._data; + + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + + return this; + } + + function addSubtract$1 (duration, input, value, direction) { + var other = createDuration(input, value); + + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + + return duration._bubble(); + } + + // supports only 2.0-style add(1, 's') or add(duration) + function add$1 (input, value) { + return addSubtract$1(this, input, value, 1); + } + + // supports only 2.0-style subtract(1, 's') or subtract(duration) + function subtract$1 (input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil (number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble () { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; + + // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + if (!((milliseconds >= 0 && days >= 0 && months >= 0) || + (milliseconds <= 0 && days <= 0 && months <= 0))) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } + + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; + + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + + hours = absFloor(minutes / 60); + data.hours = hours % 24; + + days += absFloor(hours / 24); + + // convert days to months + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + data.days = days; + data.months = months; + data.years = years; + + return this; + } + + function daysToMonths (days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; + } + + function monthsToDays (months) { + // the reverse of daysToMonths + return months * 146097 / 4800; + } + + function as (units) { + if (!this.isValid()) { + return NaN; + } + var days; + var months; + var milliseconds = this._milliseconds; + + units = normalizeUnits(units); + + if (units === 'month' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + return units === 'month' ? months : months / 12; + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case 'week' : return days / 7 + milliseconds / 6048e5; + case 'day' : return days + milliseconds / 864e5; + case 'hour' : return days * 24 + milliseconds / 36e5; + case 'minute' : return days * 1440 + milliseconds / 6e4; + case 'second' : return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': return Math.floor(days * 864e5) + milliseconds; + default: throw new Error('Unknown unit ' + units); + } + } + } + + // TODO: Use this.as('ms')? + function valueOf$1 () { + if (!this.isValid()) { + return NaN; + } + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); + } + + function makeAs (alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asYears = makeAs('y'); + + function clone$1 () { + return createDuration(this); + } + + function get$2 (units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks () { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + ss: 44, // a few seconds to seconds + s : 45, // seconds to minute + m : 45, // minutes to hour + h : 22, // hours to day + d : 26, // days to month + M : 11 // months to year + }; + + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1 (posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + + var a = seconds <= thresholds.ss && ['s', seconds] || + seconds < thresholds.s && ['ss', seconds] || + minutes <= 1 && ['m'] || + minutes < thresholds.m && ['mm', minutes] || + hours <= 1 && ['h'] || + hours < thresholds.h && ['hh', hours] || + days <= 1 && ['d'] || + days < thresholds.d && ['dd', days] || + months <= 1 && ['M'] || + months < thresholds.M && ['MM', months] || + years <= 1 && ['y'] || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } + + // This function allows you to set the rounding function for relative time strings + function getSetRelativeTimeRounding (roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + if (typeof(roundingFunction) === 'function') { + round = roundingFunction; + return true; + } + return false; + } + + // This function allows you to set a threshold for relative time strings + function getSetRelativeTimeThreshold (threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + if (threshold === 's') { + thresholds.ss = limit - 1; + } + return true; + } + + function humanize (withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return ((x > 0) - (x < 0)) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; + + // 3600 seconds -> 60 minutes -> 1 hour + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + + return totalSign + 'P' + + (Y ? ymSign + Y + 'Y' : '') + + (M ? ymSign + M + 'M' : '') + + (D ? daysSign + D + 'D' : '') + + ((h || m || s) ? 'T' : '') + + (h ? hmsSign + h + 'H' : '') + + (m ? hmsSign + m + 'M' : '') + + (s ? hmsSign + s + 'S' : ''); + } + + var proto$2 = Duration.prototype; + + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + + proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); + proto$2.lang = lang; + + // Side effect imports + + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); + + // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); + + // Side effect imports + + + hooks.version = '2.22.2'; + + setHookCallback(createLocal); + + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; + + // currently HTML5 input type only supports 24-hour formats + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // + DATE: 'YYYY-MM-DD', // + TIME: 'HH:mm', // + TIME_SECONDS: 'HH:mm:ss', // + TIME_MS: 'HH:mm:ss.SSS', // + WEEK: 'YYYY-[W]WW', // + MONTH: 'YYYY-MM' // + }; + + return hooks; + +}))); + +},{}],7:[function(require,module,exports){ +/** + * @namespace Chart + */ +var Chart = require(30)(); + +Chart.helpers = require(46); + +// @todo dispatch these helpers into appropriated helpers/helpers.* file and write unit tests! +require(28)(Chart); + +Chart.Animation = require(22); +Chart.animationService = require(23); +Chart.defaults = require(26); +Chart.Element = require(27); +Chart.elements = require(41); +Chart.Interaction = require(29); +Chart.layouts = require(31); +Chart.platform = require(49); +Chart.plugins = require(32); +Chart.Scale = require(33); +Chart.scaleService = require(34); +Chart.Ticks = require(35); +Chart.Tooltip = require(36); + +require(24)(Chart); +require(25)(Chart); + +require(56)(Chart); +require(54)(Chart); +require(55)(Chart); +require(57)(Chart); +require(58)(Chart); +require(59)(Chart); + +// Controllers must be loaded after elements +// See Chart.core.datasetController.dataElementType +require(15)(Chart); +require(16)(Chart); +require(17)(Chart); +require(18)(Chart); +require(19)(Chart); +require(20)(Chart); +require(21)(Chart); + +require(8)(Chart); +require(9)(Chart); +require(10)(Chart); +require(11)(Chart); +require(12)(Chart); +require(13)(Chart); +require(14)(Chart); + +// Loading built-in plugins +var plugins = require(50); +for (var k in plugins) { + if (plugins.hasOwnProperty(k)) { + Chart.plugins.register(plugins[k]); + } +} + +Chart.platform.initialize(); + +module.exports = Chart; +if (typeof window !== 'undefined') { + window.Chart = Chart; +} + +// DEPRECATIONS + +/** + * Provided for backward compatibility, not available anymore + * @namespace Chart.Legend + * @deprecated since version 2.1.5 + * @todo remove at version 3 + * @private + */ +Chart.Legend = plugins.legend._element; + +/** + * Provided for backward compatibility, not available anymore + * @namespace Chart.Title + * @deprecated since version 2.1.5 + * @todo remove at version 3 + * @private + */ +Chart.Title = plugins.title._element; + +/** + * Provided for backward compatibility, use Chart.plugins instead + * @namespace Chart.pluginService + * @deprecated since version 2.1.5 + * @todo remove at version 3 + * @private + */ +Chart.pluginService = Chart.plugins; + +/** + * Provided for backward compatibility, inheriting from Chart.PlugingBase has no + * effect, instead simply create/register plugins via plain JavaScript objects. + * @interface Chart.PluginBase + * @deprecated since version 2.5.0 + * @todo remove at version 3 + * @private + */ +Chart.PluginBase = Chart.Element.extend({}); + +/** + * Provided for backward compatibility, use Chart.helpers.canvas instead. + * @namespace Chart.canvasHelpers + * @deprecated since version 2.6.0 + * @todo remove at version 3 + * @private + */ +Chart.canvasHelpers = Chart.helpers.canvas; + +/** + * Provided for backward compatibility, use Chart.layouts instead. + * @namespace Chart.layoutService + * @deprecated since version 2.8.0 + * @todo remove at version 3 + * @private + */ +Chart.layoutService = Chart.layouts; + +},{"10":10,"11":11,"12":12,"13":13,"14":14,"15":15,"16":16,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"23":23,"24":24,"25":25,"26":26,"27":27,"28":28,"29":29,"30":30,"31":31,"32":32,"33":33,"34":34,"35":35,"36":36,"41":41,"46":46,"49":49,"50":50,"54":54,"55":55,"56":56,"57":57,"58":58,"59":59,"8":8,"9":9}],8:[function(require,module,exports){ +'use strict'; + +module.exports = function(Chart) { + + Chart.Bar = function(context, config) { + config.type = 'bar'; + + return new Chart(context, config); + }; + +}; + +},{}],9:[function(require,module,exports){ +'use strict'; + +module.exports = function(Chart) { + + Chart.Bubble = function(context, config) { + config.type = 'bubble'; + return new Chart(context, config); + }; + +}; + +},{}],10:[function(require,module,exports){ +'use strict'; + +module.exports = function(Chart) { + + Chart.Doughnut = function(context, config) { + config.type = 'doughnut'; + + return new Chart(context, config); + }; + +}; + +},{}],11:[function(require,module,exports){ +'use strict'; + +module.exports = function(Chart) { + + Chart.Line = function(context, config) { + config.type = 'line'; + + return new Chart(context, config); + }; + +}; + +},{}],12:[function(require,module,exports){ +'use strict'; + +module.exports = function(Chart) { + + Chart.PolarArea = function(context, config) { + config.type = 'polarArea'; + + return new Chart(context, config); + }; + +}; + +},{}],13:[function(require,module,exports){ +'use strict'; + +module.exports = function(Chart) { + + Chart.Radar = function(context, config) { + config.type = 'radar'; + + return new Chart(context, config); + }; + +}; + +},{}],14:[function(require,module,exports){ +'use strict'; + +module.exports = function(Chart) { + Chart.Scatter = function(context, config) { + config.type = 'scatter'; + return new Chart(context, config); + }; +}; + +},{}],15:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var elements = require(41); +var helpers = require(46); + +defaults._set('bar', { + hover: { + mode: 'label' + }, + + scales: { + xAxes: [{ + type: 'category', + + // Specific to Bar Controller + categoryPercentage: 0.8, + barPercentage: 0.9, + + // offset settings + offset: true, + + // grid line settings + gridLines: { + offsetGridLines: true + } + }], + + yAxes: [{ + type: 'linear' + }] + } +}); + +defaults._set('horizontalBar', { + hover: { + mode: 'index', + axis: 'y' + }, + + scales: { + xAxes: [{ + type: 'linear', + position: 'bottom' + }], + + yAxes: [{ + position: 'left', + type: 'category', + + // Specific to Horizontal Bar Controller + categoryPercentage: 0.8, + barPercentage: 0.9, + + // offset settings + offset: true, + + // grid line settings + gridLines: { + offsetGridLines: true + } + }] + }, + + elements: { + rectangle: { + borderSkipped: 'left' + } + }, + + tooltips: { + callbacks: { + title: function(item, data) { + // Pick first xLabel for now + var title = ''; + + if (item.length > 0) { + if (item[0].yLabel) { + title = item[0].yLabel; + } else if (data.labels.length > 0 && item[0].index < data.labels.length) { + title = data.labels[item[0].index]; + } + } + + return title; + }, + + label: function(item, data) { + var datasetLabel = data.datasets[item.datasetIndex].label || ''; + return datasetLabel + ': ' + item.xLabel; + } + }, + mode: 'index', + axis: 'y' + } +}); + +/** + * Computes the "optimal" sample size to maintain bars equally sized while preventing overlap. + * @private + */ +function computeMinSampleSize(scale, pixels) { + var min = scale.isHorizontal() ? scale.width : scale.height; + var ticks = scale.getTicks(); + var prev, curr, i, ilen; + + for (i = 1, ilen = pixels.length; i < ilen; ++i) { + min = Math.min(min, pixels[i] - pixels[i - 1]); + } + + for (i = 0, ilen = ticks.length; i < ilen; ++i) { + curr = scale.getPixelForTick(i); + min = i > 0 ? Math.min(min, curr - prev) : min; + prev = curr; + } + + return min; +} + +/** + * Computes an "ideal" category based on the absolute bar thickness or, if undefined or null, + * uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This + * mode currently always generates bars equally sized (until we introduce scriptable options?). + * @private + */ +function computeFitCategoryTraits(index, ruler, options) { + var thickness = options.barThickness; + var count = ruler.stackCount; + var curr = ruler.pixels[index]; + var size, ratio; + + if (helpers.isNullOrUndef(thickness)) { + size = ruler.min * options.categoryPercentage; + ratio = options.barPercentage; + } else { + // When bar thickness is enforced, category and bar percentages are ignored. + // Note(SB): we could add support for relative bar thickness (e.g. barThickness: '50%') + // and deprecate barPercentage since this value is ignored when thickness is absolute. + size = thickness * count; + ratio = 1; + } + + return { + chunk: size / count, + ratio: ratio, + start: curr - (size / 2) + }; +} + +/** + * Computes an "optimal" category that globally arranges bars side by side (no gap when + * percentage options are 1), based on the previous and following categories. This mode + * generates bars with different widths when data are not evenly spaced. + * @private + */ +function computeFlexCategoryTraits(index, ruler, options) { + var pixels = ruler.pixels; + var curr = pixels[index]; + var prev = index > 0 ? pixels[index - 1] : null; + var next = index < pixels.length - 1 ? pixels[index + 1] : null; + var percent = options.categoryPercentage; + var start, size; + + if (prev === null) { + // first data: its size is double based on the next point or, + // if it's also the last data, we use the scale end extremity. + prev = curr - (next === null ? ruler.end - curr : next - curr); + } + + if (next === null) { + // last data: its size is also double based on the previous point. + next = curr + curr - prev; + } + + start = curr - ((curr - prev) / 2) * percent; + size = ((next - prev) / 2) * percent; + + return { + chunk: size / ruler.stackCount, + ratio: options.barPercentage, + start: start + }; +} + +module.exports = function(Chart) { + + Chart.controllers.bar = Chart.DatasetController.extend({ + + dataElementType: elements.Rectangle, + + initialize: function() { + var me = this; + var meta; + + Chart.DatasetController.prototype.initialize.apply(me, arguments); + + meta = me.getMeta(); + meta.stack = me.getDataset().stack; + meta.bar = true; + }, + + update: function(reset) { + var me = this; + var rects = me.getMeta().data; + var i, ilen; + + me._ruler = me.getRuler(); + + for (i = 0, ilen = rects.length; i < ilen; ++i) { + me.updateElement(rects[i], i, reset); + } + }, + + updateElement: function(rectangle, index, reset) { + var me = this; + var chart = me.chart; + var meta = me.getMeta(); + var dataset = me.getDataset(); + var custom = rectangle.custom || {}; + var rectangleOptions = chart.options.elements.rectangle; + + rectangle._xScale = me.getScaleForId(meta.xAxisID); + rectangle._yScale = me.getScaleForId(meta.yAxisID); + rectangle._datasetIndex = me.index; + rectangle._index = index; + + rectangle._model = { + datasetLabel: dataset.label, + label: chart.data.labels[index], + borderSkipped: custom.borderSkipped ? custom.borderSkipped : rectangleOptions.borderSkipped, + backgroundColor: custom.backgroundColor ? custom.backgroundColor : helpers.valueAtIndexOrDefault(dataset.backgroundColor, index, rectangleOptions.backgroundColor), + borderColor: custom.borderColor ? custom.borderColor : helpers.valueAtIndexOrDefault(dataset.borderColor, index, rectangleOptions.borderColor), + borderWidth: custom.borderWidth ? custom.borderWidth : helpers.valueAtIndexOrDefault(dataset.borderWidth, index, rectangleOptions.borderWidth) + }; + + me.updateElementGeometry(rectangle, index, reset); + + rectangle.pivot(); + }, + + /** + * @private + */ + updateElementGeometry: function(rectangle, index, reset) { + var me = this; + var model = rectangle._model; + var vscale = me.getValueScale(); + var base = vscale.getBasePixel(); + var horizontal = vscale.isHorizontal(); + var ruler = me._ruler || me.getRuler(); + var vpixels = me.calculateBarValuePixels(me.index, index); + var ipixels = me.calculateBarIndexPixels(me.index, index, ruler); + + model.horizontal = horizontal; + model.base = reset ? base : vpixels.base; + model.x = horizontal ? reset ? base : vpixels.head : ipixels.center; + model.y = horizontal ? ipixels.center : reset ? base : vpixels.head; + model.height = horizontal ? ipixels.size : undefined; + model.width = horizontal ? undefined : ipixels.size; + }, + + /** + * @private + */ + getValueScaleId: function() { + return this.getMeta().yAxisID; + }, + + /** + * @private + */ + getIndexScaleId: function() { + return this.getMeta().xAxisID; + }, + + /** + * @private + */ + getValueScale: function() { + return this.getScaleForId(this.getValueScaleId()); + }, + + /** + * @private + */ + getIndexScale: function() { + return this.getScaleForId(this.getIndexScaleId()); + }, + + /** + * Returns the stacks based on groups and bar visibility. + * @param {Number} [last] - The dataset index + * @returns {Array} The stack list + * @private + */ + _getStacks: function(last) { + var me = this; + var chart = me.chart; + var scale = me.getIndexScale(); + var stacked = scale.options.stacked; + var ilen = last === undefined ? chart.data.datasets.length : last + 1; + var stacks = []; + var i, meta; + + for (i = 0; i < ilen; ++i) { + meta = chart.getDatasetMeta(i); + if (meta.bar && chart.isDatasetVisible(i) && + (stacked === false || + (stacked === true && stacks.indexOf(meta.stack) === -1) || + (stacked === undefined && (meta.stack === undefined || stacks.indexOf(meta.stack) === -1)))) { + stacks.push(meta.stack); + } + } + + return stacks; + }, + + /** + * Returns the effective number of stacks based on groups and bar visibility. + * @private + */ + getStackCount: function() { + return this._getStacks().length; + }, + + /** + * Returns the stack index for the given dataset based on groups and bar visibility. + * @param {Number} [datasetIndex] - The dataset index + * @param {String} [name] - The stack name to find + * @returns {Number} The stack index + * @private + */ + getStackIndex: function(datasetIndex, name) { + var stacks = this._getStacks(datasetIndex); + var index = (name !== undefined) + ? stacks.indexOf(name) + : -1; // indexOf returns -1 if element is not present + + return (index === -1) + ? stacks.length - 1 + : index; + }, + + /** + * @private + */ + getRuler: function() { + var me = this; + var scale = me.getIndexScale(); + var stackCount = me.getStackCount(); + var datasetIndex = me.index; + var isHorizontal = scale.isHorizontal(); + var start = isHorizontal ? scale.left : scale.top; + var end = start + (isHorizontal ? scale.width : scale.height); + var pixels = []; + var i, ilen, min; + + for (i = 0, ilen = me.getMeta().data.length; i < ilen; ++i) { + pixels.push(scale.getPixelForValue(null, i, datasetIndex)); + } + + min = helpers.isNullOrUndef(scale.options.barThickness) + ? computeMinSampleSize(scale, pixels) + : -1; + + return { + min: min, + pixels: pixels, + start: start, + end: end, + stackCount: stackCount, + scale: scale + }; + }, + + /** + * Note: pixel values are not clamped to the scale area. + * @private + */ + calculateBarValuePixels: function(datasetIndex, index) { + var me = this; + var chart = me.chart; + var meta = me.getMeta(); + var scale = me.getValueScale(); + var datasets = chart.data.datasets; + var value = scale.getRightValue(datasets[datasetIndex].data[index]); + var stacked = scale.options.stacked; + var stack = meta.stack; + var start = 0; + var i, imeta, ivalue, base, head, size; + + if (stacked || (stacked === undefined && stack !== undefined)) { + for (i = 0; i < datasetIndex; ++i) { + imeta = chart.getDatasetMeta(i); + + if (imeta.bar && + imeta.stack === stack && + imeta.controller.getValueScaleId() === scale.id && + chart.isDatasetVisible(i)) { + + ivalue = scale.getRightValue(datasets[i].data[index]); + if ((value < 0 && ivalue < 0) || (value >= 0 && ivalue > 0)) { + start += ivalue; + } + } + } + } + + base = scale.getPixelForValue(start); + head = scale.getPixelForValue(start + value); + size = (head - base) / 2; + + return { + size: size, + base: base, + head: head, + center: head + size / 2 + }; + }, + + /** + * @private + */ + calculateBarIndexPixels: function(datasetIndex, index, ruler) { + var me = this; + var options = ruler.scale.options; + var range = options.barThickness === 'flex' + ? computeFlexCategoryTraits(index, ruler, options) + : computeFitCategoryTraits(index, ruler, options); + + var stackIndex = me.getStackIndex(datasetIndex, me.getMeta().stack); + var center = range.start + (range.chunk * stackIndex) + (range.chunk / 2); + var size = Math.min( + helpers.valueOrDefault(options.maxBarThickness, Infinity), + range.chunk * range.ratio); + + return { + base: center - size / 2, + head: center + size / 2, + center: center, + size: size + }; + }, + + draw: function() { + var me = this; + var chart = me.chart; + var scale = me.getValueScale(); + var rects = me.getMeta().data; + var dataset = me.getDataset(); + var ilen = rects.length; + var i = 0; + + helpers.canvas.clipArea(chart.ctx, chart.chartArea); + + for (; i < ilen; ++i) { + if (!isNaN(scale.getRightValue(dataset.data[i]))) { + rects[i].draw(); + } + } + + helpers.canvas.unclipArea(chart.ctx); + }, + }); + + Chart.controllers.horizontalBar = Chart.controllers.bar.extend({ + /** + * @private + */ + getValueScaleId: function() { + return this.getMeta().xAxisID; + }, + + /** + * @private + */ + getIndexScaleId: function() { + return this.getMeta().yAxisID; + } + }); +}; + +},{"26":26,"41":41,"46":46}],16:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var elements = require(41); +var helpers = require(46); + +defaults._set('bubble', { + hover: { + mode: 'single' + }, + + scales: { + xAxes: [{ + type: 'linear', // bubble should probably use a linear scale by default + position: 'bottom', + id: 'x-axis-0' // need an ID so datasets can reference the scale + }], + yAxes: [{ + type: 'linear', + position: 'left', + id: 'y-axis-0' + }] + }, + + tooltips: { + callbacks: { + title: function() { + // Title doesn't make sense for scatter since we format the data as a point + return ''; + }, + label: function(item, data) { + var datasetLabel = data.datasets[item.datasetIndex].label || ''; + var dataPoint = data.datasets[item.datasetIndex].data[item.index]; + return datasetLabel + ': (' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.r + ')'; + } + } + } +}); + + +module.exports = function(Chart) { + + Chart.controllers.bubble = Chart.DatasetController.extend({ + /** + * @protected + */ + dataElementType: elements.Point, + + /** + * @protected + */ + update: function(reset) { + var me = this; + var meta = me.getMeta(); + var points = meta.data; + + // Update Points + helpers.each(points, function(point, index) { + me.updateElement(point, index, reset); + }); + }, + + /** + * @protected + */ + updateElement: function(point, index, reset) { + var me = this; + var meta = me.getMeta(); + var custom = point.custom || {}; + var xScale = me.getScaleForId(meta.xAxisID); + var yScale = me.getScaleForId(meta.yAxisID); + var options = me._resolveElementOptions(point, index); + var data = me.getDataset().data[index]; + var dsIndex = me.index; + + var x = reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex); + var y = reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex); + + point._xScale = xScale; + point._yScale = yScale; + point._options = options; + point._datasetIndex = dsIndex; + point._index = index; + point._model = { + backgroundColor: options.backgroundColor, + borderColor: options.borderColor, + borderWidth: options.borderWidth, + hitRadius: options.hitRadius, + pointStyle: options.pointStyle, + rotation: options.rotation, + radius: reset ? 0 : options.radius, + skip: custom.skip || isNaN(x) || isNaN(y), + x: x, + y: y, + }; + + point.pivot(); + }, + + /** + * @protected + */ + setHoverStyle: function(point) { + var model = point._model; + var options = point._options; + point.$previousStyle = { + backgroundColor: model.backgroundColor, + borderColor: model.borderColor, + borderWidth: model.borderWidth, + radius: model.radius + }; + model.backgroundColor = helpers.valueOrDefault(options.hoverBackgroundColor, helpers.getHoverColor(options.backgroundColor)); + model.borderColor = helpers.valueOrDefault(options.hoverBorderColor, helpers.getHoverColor(options.borderColor)); + model.borderWidth = helpers.valueOrDefault(options.hoverBorderWidth, options.borderWidth); + model.radius = options.radius + options.hoverRadius; + }, + + /** + * @private + */ + _resolveElementOptions: function(point, index) { + var me = this; + var chart = me.chart; + var datasets = chart.data.datasets; + var dataset = datasets[me.index]; + var custom = point.custom || {}; + var options = chart.options.elements.point; + var resolve = helpers.options.resolve; + var data = dataset.data[index]; + var values = {}; + var i, ilen, key; + + // Scriptable options + var context = { + chart: chart, + dataIndex: index, + dataset: dataset, + datasetIndex: me.index + }; + + var keys = [ + 'backgroundColor', + 'borderColor', + 'borderWidth', + 'hoverBackgroundColor', + 'hoverBorderColor', + 'hoverBorderWidth', + 'hoverRadius', + 'hitRadius', + 'pointStyle', + 'rotation' + ]; + + for (i = 0, ilen = keys.length; i < ilen; ++i) { + key = keys[i]; + values[key] = resolve([ + custom[key], + dataset[key], + options[key] + ], context, index); + } + + // Custom radius resolution + values.radius = resolve([ + custom.radius, + data ? data.r : undefined, + dataset.radius, + options.radius + ], context, index); + return values; + } + }); +}; + +},{"26":26,"41":41,"46":46}],17:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var elements = require(41); +var helpers = require(46); + +defaults._set('doughnut', { + animation: { + // Boolean - Whether we animate the rotation of the Doughnut + animateRotate: true, + // Boolean - Whether we animate scaling the Doughnut from the centre + animateScale: false + }, + hover: { + mode: 'single' + }, + legendCallback: function(chart) { + var text = []; + text.push('
      '); + + var data = chart.data; + var datasets = data.datasets; + var labels = data.labels; + + if (datasets.length) { + for (var i = 0; i < datasets[0].data.length; ++i) { + text.push('
    • '); + if (labels[i]) { + text.push(labels[i]); + } + text.push('
    • '); + } + } + + text.push('
    '); + return text.join(''); + }, + legend: { + labels: { + generateLabels: function(chart) { + var data = chart.data; + if (data.labels.length && data.datasets.length) { + return data.labels.map(function(label, i) { + var meta = chart.getDatasetMeta(0); + var ds = data.datasets[0]; + var arc = meta.data[i]; + var custom = arc && arc.custom || {}; + var valueAtIndexOrDefault = helpers.valueAtIndexOrDefault; + var arcOpts = chart.options.elements.arc; + var fill = custom.backgroundColor ? custom.backgroundColor : valueAtIndexOrDefault(ds.backgroundColor, i, arcOpts.backgroundColor); + var stroke = custom.borderColor ? custom.borderColor : valueAtIndexOrDefault(ds.borderColor, i, arcOpts.borderColor); + var bw = custom.borderWidth ? custom.borderWidth : valueAtIndexOrDefault(ds.borderWidth, i, arcOpts.borderWidth); + + return { + text: label, + fillStyle: fill, + strokeStyle: stroke, + lineWidth: bw, + hidden: isNaN(ds.data[i]) || meta.data[i].hidden, + + // Extra data used for toggling the correct item + index: i + }; + }); + } + return []; + } + }, + + onClick: function(e, legendItem) { + var index = legendItem.index; + var chart = this.chart; + var i, ilen, meta; + + for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) { + meta = chart.getDatasetMeta(i); + // toggle visibility of index if exists + if (meta.data[index]) { + meta.data[index].hidden = !meta.data[index].hidden; + } + } + + chart.update(); + } + }, + + // The percentage of the chart that we cut out of the middle. + cutoutPercentage: 50, + + // The rotation of the chart, where the first data arc begins. + rotation: Math.PI * -0.5, + + // The total circumference of the chart. + circumference: Math.PI * 2.0, + + // Need to override these to give a nice default + tooltips: { + callbacks: { + title: function() { + return ''; + }, + label: function(tooltipItem, data) { + var dataLabel = data.labels[tooltipItem.index]; + var value = ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index]; + + if (helpers.isArray(dataLabel)) { + // show value on first line of multiline label + // need to clone because we are changing the value + dataLabel = dataLabel.slice(); + dataLabel[0] += value; + } else { + dataLabel += value; + } + + return dataLabel; + } + } + } +}); + +defaults._set('pie', helpers.clone(defaults.doughnut)); +defaults._set('pie', { + cutoutPercentage: 0 +}); + +module.exports = function(Chart) { + + Chart.controllers.doughnut = Chart.controllers.pie = Chart.DatasetController.extend({ + + dataElementType: elements.Arc, + + linkScales: helpers.noop, + + // Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly + getRingIndex: function(datasetIndex) { + var ringIndex = 0; + + for (var j = 0; j < datasetIndex; ++j) { + if (this.chart.isDatasetVisible(j)) { + ++ringIndex; + } + } + + return ringIndex; + }, + + update: function(reset) { + var me = this; + var chart = me.chart; + var chartArea = chart.chartArea; + var opts = chart.options; + var arcOpts = opts.elements.arc; + var availableWidth = chartArea.right - chartArea.left - arcOpts.borderWidth; + var availableHeight = chartArea.bottom - chartArea.top - arcOpts.borderWidth; + var minSize = Math.min(availableWidth, availableHeight); + var offset = {x: 0, y: 0}; + var meta = me.getMeta(); + var cutoutPercentage = opts.cutoutPercentage; + var circumference = opts.circumference; + + // If the chart's circumference isn't a full circle, calculate minSize as a ratio of the width/height of the arc + if (circumference < Math.PI * 2.0) { + var startAngle = opts.rotation % (Math.PI * 2.0); + startAngle += Math.PI * 2.0 * (startAngle >= Math.PI ? -1 : startAngle < -Math.PI ? 1 : 0); + var endAngle = startAngle + circumference; + var start = {x: Math.cos(startAngle), y: Math.sin(startAngle)}; + var end = {x: Math.cos(endAngle), y: Math.sin(endAngle)}; + var contains0 = (startAngle <= 0 && endAngle >= 0) || (startAngle <= Math.PI * 2.0 && Math.PI * 2.0 <= endAngle); + var contains90 = (startAngle <= Math.PI * 0.5 && Math.PI * 0.5 <= endAngle) || (startAngle <= Math.PI * 2.5 && Math.PI * 2.5 <= endAngle); + var contains180 = (startAngle <= -Math.PI && -Math.PI <= endAngle) || (startAngle <= Math.PI && Math.PI <= endAngle); + var contains270 = (startAngle <= -Math.PI * 0.5 && -Math.PI * 0.5 <= endAngle) || (startAngle <= Math.PI * 1.5 && Math.PI * 1.5 <= endAngle); + var cutout = cutoutPercentage / 100.0; + var min = {x: contains180 ? -1 : Math.min(start.x * (start.x < 0 ? 1 : cutout), end.x * (end.x < 0 ? 1 : cutout)), y: contains270 ? -1 : Math.min(start.y * (start.y < 0 ? 1 : cutout), end.y * (end.y < 0 ? 1 : cutout))}; + var max = {x: contains0 ? 1 : Math.max(start.x * (start.x > 0 ? 1 : cutout), end.x * (end.x > 0 ? 1 : cutout)), y: contains90 ? 1 : Math.max(start.y * (start.y > 0 ? 1 : cutout), end.y * (end.y > 0 ? 1 : cutout))}; + var size = {width: (max.x - min.x) * 0.5, height: (max.y - min.y) * 0.5}; + minSize = Math.min(availableWidth / size.width, availableHeight / size.height); + offset = {x: (max.x + min.x) * -0.5, y: (max.y + min.y) * -0.5}; + } + + chart.borderWidth = me.getMaxBorderWidth(meta.data); + chart.outerRadius = Math.max((minSize - chart.borderWidth) / 2, 0); + chart.innerRadius = Math.max(cutoutPercentage ? (chart.outerRadius / 100) * (cutoutPercentage) : 0, 0); + chart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount(); + chart.offsetX = offset.x * chart.outerRadius; + chart.offsetY = offset.y * chart.outerRadius; + + meta.total = me.calculateTotal(); + + me.outerRadius = chart.outerRadius - (chart.radiusLength * me.getRingIndex(me.index)); + me.innerRadius = Math.max(me.outerRadius - chart.radiusLength, 0); + + helpers.each(meta.data, function(arc, index) { + me.updateElement(arc, index, reset); + }); + }, + + updateElement: function(arc, index, reset) { + var me = this; + var chart = me.chart; + var chartArea = chart.chartArea; + var opts = chart.options; + var animationOpts = opts.animation; + var centerX = (chartArea.left + chartArea.right) / 2; + var centerY = (chartArea.top + chartArea.bottom) / 2; + var startAngle = opts.rotation; // non reset case handled later + var endAngle = opts.rotation; // non reset case handled later + var dataset = me.getDataset(); + var circumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / (2.0 * Math.PI)); + var innerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius; + var outerRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius; + var valueAtIndexOrDefault = helpers.valueAtIndexOrDefault; + + helpers.extend(arc, { + // Utility + _datasetIndex: me.index, + _index: index, + + // Desired view properties + _model: { + x: centerX + chart.offsetX, + y: centerY + chart.offsetY, + startAngle: startAngle, + endAngle: endAngle, + circumference: circumference, + outerRadius: outerRadius, + innerRadius: innerRadius, + label: valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index]) + } + }); + + var model = arc._model; + + // Resets the visual styles + var custom = arc.custom || {}; + var valueOrDefault = helpers.valueAtIndexOrDefault; + var elementOpts = this.chart.options.elements.arc; + model.backgroundColor = custom.backgroundColor ? custom.backgroundColor : valueOrDefault(dataset.backgroundColor, index, elementOpts.backgroundColor); + model.borderColor = custom.borderColor ? custom.borderColor : valueOrDefault(dataset.borderColor, index, elementOpts.borderColor); + model.borderWidth = custom.borderWidth ? custom.borderWidth : valueOrDefault(dataset.borderWidth, index, elementOpts.borderWidth); + + // Set correct angles if not resetting + if (!reset || !animationOpts.animateRotate) { + if (index === 0) { + model.startAngle = opts.rotation; + } else { + model.startAngle = me.getMeta().data[index - 1]._model.endAngle; + } + + model.endAngle = model.startAngle + model.circumference; + } + + arc.pivot(); + }, + + calculateTotal: function() { + var dataset = this.getDataset(); + var meta = this.getMeta(); + var total = 0; + var value; + + helpers.each(meta.data, function(element, index) { + value = dataset.data[index]; + if (!isNaN(value) && !element.hidden) { + total += Math.abs(value); + } + }); + + /* if (total === 0) { + total = NaN; + }*/ + + return total; + }, + + calculateCircumference: function(value) { + var total = this.getMeta().total; + if (total > 0 && !isNaN(value)) { + return (Math.PI * 2.0) * (Math.abs(value) / total); + } + return 0; + }, + + // gets the max border or hover width to properly scale pie charts + getMaxBorderWidth: function(arcs) { + var max = 0; + var index = this.index; + var length = arcs.length; + var borderWidth; + var hoverWidth; + + for (var i = 0; i < length; i++) { + borderWidth = arcs[i]._model ? arcs[i]._model.borderWidth : 0; + hoverWidth = arcs[i]._chart ? arcs[i]._chart.config.data.datasets[index].hoverBorderWidth : 0; + + max = borderWidth > max ? borderWidth : max; + max = hoverWidth > max ? hoverWidth : max; + } + return max; + } + }); +}; + +},{"26":26,"41":41,"46":46}],18:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var elements = require(41); +var helpers = require(46); + +defaults._set('line', { + showLines: true, + spanGaps: false, + + hover: { + mode: 'label' + }, + + scales: { + xAxes: [{ + type: 'category', + id: 'x-axis-0' + }], + yAxes: [{ + type: 'linear', + id: 'y-axis-0' + }] + } +}); + +module.exports = function(Chart) { + + function lineEnabled(dataset, options) { + return helpers.valueOrDefault(dataset.showLine, options.showLines); + } + + Chart.controllers.line = Chart.DatasetController.extend({ + + datasetElementType: elements.Line, + + dataElementType: elements.Point, + + update: function(reset) { + var me = this; + var meta = me.getMeta(); + var line = meta.dataset; + var points = meta.data || []; + var options = me.chart.options; + var lineElementOptions = options.elements.line; + var scale = me.getScaleForId(meta.yAxisID); + var i, ilen, custom; + var dataset = me.getDataset(); + var showLine = lineEnabled(dataset, options); + + // Update Line + if (showLine) { + custom = line.custom || {}; + + // Compatibility: If the properties are defined with only the old name, use those values + if ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) { + dataset.lineTension = dataset.tension; + } + + // Utility + line._scale = scale; + line._datasetIndex = me.index; + // Data + line._children = points; + // Model + line._model = { + // Appearance + // The default behavior of lines is to break at null values, according + // to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158 + // This option gives lines the ability to span gaps + spanGaps: dataset.spanGaps ? dataset.spanGaps : options.spanGaps, + tension: custom.tension ? custom.tension : helpers.valueOrDefault(dataset.lineTension, lineElementOptions.tension), + backgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor), + borderWidth: custom.borderWidth ? custom.borderWidth : (dataset.borderWidth || lineElementOptions.borderWidth), + borderColor: custom.borderColor ? custom.borderColor : (dataset.borderColor || lineElementOptions.borderColor), + borderCapStyle: custom.borderCapStyle ? custom.borderCapStyle : (dataset.borderCapStyle || lineElementOptions.borderCapStyle), + borderDash: custom.borderDash ? custom.borderDash : (dataset.borderDash || lineElementOptions.borderDash), + borderDashOffset: custom.borderDashOffset ? custom.borderDashOffset : (dataset.borderDashOffset || lineElementOptions.borderDashOffset), + borderJoinStyle: custom.borderJoinStyle ? custom.borderJoinStyle : (dataset.borderJoinStyle || lineElementOptions.borderJoinStyle), + fill: custom.fill ? custom.fill : (dataset.fill !== undefined ? dataset.fill : lineElementOptions.fill), + steppedLine: custom.steppedLine ? custom.steppedLine : helpers.valueOrDefault(dataset.steppedLine, lineElementOptions.stepped), + cubicInterpolationMode: custom.cubicInterpolationMode ? custom.cubicInterpolationMode : helpers.valueOrDefault(dataset.cubicInterpolationMode, lineElementOptions.cubicInterpolationMode), + }; + + line.pivot(); + } + + // Update Points + for (i = 0, ilen = points.length; i < ilen; ++i) { + me.updateElement(points[i], i, reset); + } + + if (showLine && line._model.tension !== 0) { + me.updateBezierControlPoints(); + } + + // Now pivot the point for animation + for (i = 0, ilen = points.length; i < ilen; ++i) { + points[i].pivot(); + } + }, + + getPointBackgroundColor: function(point, index) { + var backgroundColor = this.chart.options.elements.point.backgroundColor; + var dataset = this.getDataset(); + var custom = point.custom || {}; + + if (custom.backgroundColor) { + backgroundColor = custom.backgroundColor; + } else if (dataset.pointBackgroundColor) { + backgroundColor = helpers.valueAtIndexOrDefault(dataset.pointBackgroundColor, index, backgroundColor); + } else if (dataset.backgroundColor) { + backgroundColor = dataset.backgroundColor; + } + + return backgroundColor; + }, + + getPointBorderColor: function(point, index) { + var borderColor = this.chart.options.elements.point.borderColor; + var dataset = this.getDataset(); + var custom = point.custom || {}; + + if (custom.borderColor) { + borderColor = custom.borderColor; + } else if (dataset.pointBorderColor) { + borderColor = helpers.valueAtIndexOrDefault(dataset.pointBorderColor, index, borderColor); + } else if (dataset.borderColor) { + borderColor = dataset.borderColor; + } + + return borderColor; + }, + + getPointBorderWidth: function(point, index) { + var borderWidth = this.chart.options.elements.point.borderWidth; + var dataset = this.getDataset(); + var custom = point.custom || {}; + + if (!isNaN(custom.borderWidth)) { + borderWidth = custom.borderWidth; + } else if (!isNaN(dataset.pointBorderWidth) || helpers.isArray(dataset.pointBorderWidth)) { + borderWidth = helpers.valueAtIndexOrDefault(dataset.pointBorderWidth, index, borderWidth); + } else if (!isNaN(dataset.borderWidth)) { + borderWidth = dataset.borderWidth; + } + + return borderWidth; + }, + + getPointRotation: function(point, index) { + var pointRotation = this.chart.options.elements.point.rotation; + var dataset = this.getDataset(); + var custom = point.custom || {}; + + if (!isNaN(custom.rotation)) { + pointRotation = custom.rotation; + } else if (!isNaN(dataset.pointRotation) || helpers.isArray(dataset.pointRotation)) { + pointRotation = helpers.valueAtIndexOrDefault(dataset.pointRotation, index, pointRotation); + } + return pointRotation; + }, + + updateElement: function(point, index, reset) { + var me = this; + var meta = me.getMeta(); + var custom = point.custom || {}; + var dataset = me.getDataset(); + var datasetIndex = me.index; + var value = dataset.data[index]; + var yScale = me.getScaleForId(meta.yAxisID); + var xScale = me.getScaleForId(meta.xAxisID); + var pointOptions = me.chart.options.elements.point; + var x, y; + + // Compatibility: If the properties are defined with only the old name, use those values + if ((dataset.radius !== undefined) && (dataset.pointRadius === undefined)) { + dataset.pointRadius = dataset.radius; + } + if ((dataset.hitRadius !== undefined) && (dataset.pointHitRadius === undefined)) { + dataset.pointHitRadius = dataset.hitRadius; + } + + x = xScale.getPixelForValue(typeof value === 'object' ? value : NaN, index, datasetIndex); + y = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex); + + // Utility + point._xScale = xScale; + point._yScale = yScale; + point._datasetIndex = datasetIndex; + point._index = index; + + // Desired view properties + point._model = { + x: x, + y: y, + skip: custom.skip || isNaN(x) || isNaN(y), + // Appearance + radius: custom.radius || helpers.valueAtIndexOrDefault(dataset.pointRadius, index, pointOptions.radius), + pointStyle: custom.pointStyle || helpers.valueAtIndexOrDefault(dataset.pointStyle, index, pointOptions.pointStyle), + rotation: me.getPointRotation(point, index), + backgroundColor: me.getPointBackgroundColor(point, index), + borderColor: me.getPointBorderColor(point, index), + borderWidth: me.getPointBorderWidth(point, index), + tension: meta.dataset._model ? meta.dataset._model.tension : 0, + steppedLine: meta.dataset._model ? meta.dataset._model.steppedLine : false, + // Tooltip + hitRadius: custom.hitRadius || helpers.valueAtIndexOrDefault(dataset.pointHitRadius, index, pointOptions.hitRadius) + }; + }, + + calculatePointY: function(value, index, datasetIndex) { + var me = this; + var chart = me.chart; + var meta = me.getMeta(); + var yScale = me.getScaleForId(meta.yAxisID); + var sumPos = 0; + var sumNeg = 0; + var i, ds, dsMeta; + + if (yScale.options.stacked) { + for (i = 0; i < datasetIndex; i++) { + ds = chart.data.datasets[i]; + dsMeta = chart.getDatasetMeta(i); + if (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id && chart.isDatasetVisible(i)) { + var stackedRightValue = Number(yScale.getRightValue(ds.data[index])); + if (stackedRightValue < 0) { + sumNeg += stackedRightValue || 0; + } else { + sumPos += stackedRightValue || 0; + } + } + } + + var rightValue = Number(yScale.getRightValue(value)); + if (rightValue < 0) { + return yScale.getPixelForValue(sumNeg + rightValue); + } + return yScale.getPixelForValue(sumPos + rightValue); + } + + return yScale.getPixelForValue(value); + }, + + updateBezierControlPoints: function() { + var me = this; + var meta = me.getMeta(); + var area = me.chart.chartArea; + var points = (meta.data || []); + var i, ilen, point, model, controlPoints; + + // Only consider points that are drawn in case the spanGaps option is used + if (meta.dataset._model.spanGaps) { + points = points.filter(function(pt) { + return !pt._model.skip; + }); + } + + function capControlPoint(pt, min, max) { + return Math.max(Math.min(pt, max), min); + } + + if (meta.dataset._model.cubicInterpolationMode === 'monotone') { + helpers.splineCurveMonotone(points); + } else { + for (i = 0, ilen = points.length; i < ilen; ++i) { + point = points[i]; + model = point._model; + controlPoints = helpers.splineCurve( + helpers.previousItem(points, i)._model, + model, + helpers.nextItem(points, i)._model, + meta.dataset._model.tension + ); + model.controlPointPreviousX = controlPoints.previous.x; + model.controlPointPreviousY = controlPoints.previous.y; + model.controlPointNextX = controlPoints.next.x; + model.controlPointNextY = controlPoints.next.y; + } + } + + if (me.chart.options.elements.line.capBezierPoints) { + for (i = 0, ilen = points.length; i < ilen; ++i) { + model = points[i]._model; + model.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right); + model.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom); + model.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right); + model.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom); + } + } + }, + + draw: function() { + var me = this; + var chart = me.chart; + var meta = me.getMeta(); + var points = meta.data || []; + var area = chart.chartArea; + var ilen = points.length; + var halfBorderWidth; + var i = 0; + + if (lineEnabled(me.getDataset(), chart.options)) { + halfBorderWidth = (meta.dataset._model.borderWidth || 0) / 2; + + helpers.canvas.clipArea(chart.ctx, { + left: area.left, + right: area.right, + top: area.top - halfBorderWidth, + bottom: area.bottom + halfBorderWidth + }); + + meta.dataset.draw(); + + helpers.canvas.unclipArea(chart.ctx); + } + + // Draw the points + for (; i < ilen; ++i) { + points[i].draw(area); + } + }, + + setHoverStyle: function(element) { + // Point + var dataset = this.chart.data.datasets[element._datasetIndex]; + var index = element._index; + var custom = element.custom || {}; + var model = element._model; + + element.$previousStyle = { + backgroundColor: model.backgroundColor, + borderColor: model.borderColor, + borderWidth: model.borderWidth, + radius: model.radius + }; + + model.backgroundColor = custom.hoverBackgroundColor || helpers.valueAtIndexOrDefault(dataset.pointHoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor)); + model.borderColor = custom.hoverBorderColor || helpers.valueAtIndexOrDefault(dataset.pointHoverBorderColor, index, helpers.getHoverColor(model.borderColor)); + model.borderWidth = custom.hoverBorderWidth || helpers.valueAtIndexOrDefault(dataset.pointHoverBorderWidth, index, model.borderWidth); + model.radius = custom.hoverRadius || helpers.valueAtIndexOrDefault(dataset.pointHoverRadius, index, this.chart.options.elements.point.hoverRadius); + }, + }); +}; + +},{"26":26,"41":41,"46":46}],19:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var elements = require(41); +var helpers = require(46); + +defaults._set('polarArea', { + scale: { + type: 'radialLinear', + angleLines: { + display: false + }, + gridLines: { + circular: true + }, + pointLabels: { + display: false + }, + ticks: { + beginAtZero: true + } + }, + + // Boolean - Whether to animate the rotation of the chart + animation: { + animateRotate: true, + animateScale: true + }, + + startAngle: -0.5 * Math.PI, + legendCallback: function(chart) { + var text = []; + text.push('
      '); + + var data = chart.data; + var datasets = data.datasets; + var labels = data.labels; + + if (datasets.length) { + for (var i = 0; i < datasets[0].data.length; ++i) { + text.push('
    • '); + if (labels[i]) { + text.push(labels[i]); + } + text.push('
    • '); + } + } + + text.push('
    '); + return text.join(''); + }, + legend: { + labels: { + generateLabels: function(chart) { + var data = chart.data; + if (data.labels.length && data.datasets.length) { + return data.labels.map(function(label, i) { + var meta = chart.getDatasetMeta(0); + var ds = data.datasets[0]; + var arc = meta.data[i]; + var custom = arc.custom || {}; + var valueAtIndexOrDefault = helpers.valueAtIndexOrDefault; + var arcOpts = chart.options.elements.arc; + var fill = custom.backgroundColor ? custom.backgroundColor : valueAtIndexOrDefault(ds.backgroundColor, i, arcOpts.backgroundColor); + var stroke = custom.borderColor ? custom.borderColor : valueAtIndexOrDefault(ds.borderColor, i, arcOpts.borderColor); + var bw = custom.borderWidth ? custom.borderWidth : valueAtIndexOrDefault(ds.borderWidth, i, arcOpts.borderWidth); + + return { + text: label, + fillStyle: fill, + strokeStyle: stroke, + lineWidth: bw, + hidden: isNaN(ds.data[i]) || meta.data[i].hidden, + + // Extra data used for toggling the correct item + index: i + }; + }); + } + return []; + } + }, + + onClick: function(e, legendItem) { + var index = legendItem.index; + var chart = this.chart; + var i, ilen, meta; + + for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) { + meta = chart.getDatasetMeta(i); + meta.data[index].hidden = !meta.data[index].hidden; + } + + chart.update(); + } + }, + + // Need to override these to give a nice default + tooltips: { + callbacks: { + title: function() { + return ''; + }, + label: function(item, data) { + return data.labels[item.index] + ': ' + item.yLabel; + } + } + } +}); + +module.exports = function(Chart) { + + Chart.controllers.polarArea = Chart.DatasetController.extend({ + + dataElementType: elements.Arc, + + linkScales: helpers.noop, + + update: function(reset) { + var me = this; + var dataset = me.getDataset(); + var meta = me.getMeta(); + var start = me.chart.options.startAngle || 0; + var starts = me._starts = []; + var angles = me._angles = []; + var i, ilen, angle; + + me._updateRadius(); + + meta.count = me.countVisibleElements(); + + for (i = 0, ilen = dataset.data.length; i < ilen; i++) { + starts[i] = start; + angle = me._computeAngle(i); + angles[i] = angle; + start += angle; + } + + helpers.each(meta.data, function(arc, index) { + me.updateElement(arc, index, reset); + }); + }, + + /** + * @private + */ + _updateRadius: function() { + var me = this; + var chart = me.chart; + var chartArea = chart.chartArea; + var opts = chart.options; + var arcOpts = opts.elements.arc; + var minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top); + + chart.outerRadius = Math.max((minSize - arcOpts.borderWidth / 2) / 2, 0); + chart.innerRadius = Math.max(opts.cutoutPercentage ? (chart.outerRadius / 100) * (opts.cutoutPercentage) : 1, 0); + chart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount(); + + me.outerRadius = chart.outerRadius - (chart.radiusLength * me.index); + me.innerRadius = me.outerRadius - chart.radiusLength; + }, + + updateElement: function(arc, index, reset) { + var me = this; + var chart = me.chart; + var dataset = me.getDataset(); + var opts = chart.options; + var animationOpts = opts.animation; + var scale = chart.scale; + var labels = chart.data.labels; + + var centerX = scale.xCenter; + var centerY = scale.yCenter; + + // var negHalfPI = -0.5 * Math.PI; + var datasetStartAngle = opts.startAngle; + var distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]); + var startAngle = me._starts[index]; + var endAngle = startAngle + (arc.hidden ? 0 : me._angles[index]); + + var resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]); + + helpers.extend(arc, { + // Utility + _datasetIndex: me.index, + _index: index, + _scale: scale, + + // Desired view properties + _model: { + x: centerX, + y: centerY, + innerRadius: 0, + outerRadius: reset ? resetRadius : distance, + startAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle, + endAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle, + label: helpers.valueAtIndexOrDefault(labels, index, labels[index]) + } + }); + + // Apply border and fill style + var elementOpts = this.chart.options.elements.arc; + var custom = arc.custom || {}; + var valueOrDefault = helpers.valueAtIndexOrDefault; + var model = arc._model; + + model.backgroundColor = custom.backgroundColor ? custom.backgroundColor : valueOrDefault(dataset.backgroundColor, index, elementOpts.backgroundColor); + model.borderColor = custom.borderColor ? custom.borderColor : valueOrDefault(dataset.borderColor, index, elementOpts.borderColor); + model.borderWidth = custom.borderWidth ? custom.borderWidth : valueOrDefault(dataset.borderWidth, index, elementOpts.borderWidth); + + arc.pivot(); + }, + + countVisibleElements: function() { + var dataset = this.getDataset(); + var meta = this.getMeta(); + var count = 0; + + helpers.each(meta.data, function(element, index) { + if (!isNaN(dataset.data[index]) && !element.hidden) { + count++; + } + }); + + return count; + }, + + /** + * @private + */ + _computeAngle: function(index) { + var me = this; + var count = this.getMeta().count; + var dataset = me.getDataset(); + var meta = me.getMeta(); + + if (isNaN(dataset.data[index]) || meta.data[index].hidden) { + return 0; + } + + // Scriptable options + var context = { + chart: me.chart, + dataIndex: index, + dataset: dataset, + datasetIndex: me.index + }; + + return helpers.options.resolve([ + me.chart.options.elements.arc.angle, + (2 * Math.PI) / count + ], context, index); + } + }); +}; + +},{"26":26,"41":41,"46":46}],20:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var elements = require(41); +var helpers = require(46); + +defaults._set('radar', { + scale: { + type: 'radialLinear' + }, + elements: { + line: { + tension: 0 // no bezier in radar + } + } +}); + +module.exports = function(Chart) { + + Chart.controllers.radar = Chart.DatasetController.extend({ + + datasetElementType: elements.Line, + + dataElementType: elements.Point, + + linkScales: helpers.noop, + + update: function(reset) { + var me = this; + var meta = me.getMeta(); + var line = meta.dataset; + var points = meta.data; + var custom = line.custom || {}; + var dataset = me.getDataset(); + var lineElementOptions = me.chart.options.elements.line; + var scale = me.chart.scale; + + // Compatibility: If the properties are defined with only the old name, use those values + if ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) { + dataset.lineTension = dataset.tension; + } + + helpers.extend(meta.dataset, { + // Utility + _datasetIndex: me.index, + _scale: scale, + // Data + _children: points, + _loop: true, + // Model + _model: { + // Appearance + tension: custom.tension ? custom.tension : helpers.valueOrDefault(dataset.lineTension, lineElementOptions.tension), + backgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor), + borderWidth: custom.borderWidth ? custom.borderWidth : (dataset.borderWidth || lineElementOptions.borderWidth), + borderColor: custom.borderColor ? custom.borderColor : (dataset.borderColor || lineElementOptions.borderColor), + fill: custom.fill ? custom.fill : (dataset.fill !== undefined ? dataset.fill : lineElementOptions.fill), + borderCapStyle: custom.borderCapStyle ? custom.borderCapStyle : (dataset.borderCapStyle || lineElementOptions.borderCapStyle), + borderDash: custom.borderDash ? custom.borderDash : (dataset.borderDash || lineElementOptions.borderDash), + borderDashOffset: custom.borderDashOffset ? custom.borderDashOffset : (dataset.borderDashOffset || lineElementOptions.borderDashOffset), + borderJoinStyle: custom.borderJoinStyle ? custom.borderJoinStyle : (dataset.borderJoinStyle || lineElementOptions.borderJoinStyle), + } + }); + + meta.dataset.pivot(); + + // Update Points + helpers.each(points, function(point, index) { + me.updateElement(point, index, reset); + }, me); + + // Update bezier control points + me.updateBezierControlPoints(); + }, + updateElement: function(point, index, reset) { + var me = this; + var custom = point.custom || {}; + var dataset = me.getDataset(); + var scale = me.chart.scale; + var pointElementOptions = me.chart.options.elements.point; + var pointPosition = scale.getPointPositionForValue(index, dataset.data[index]); + + // Compatibility: If the properties are defined with only the old name, use those values + if ((dataset.radius !== undefined) && (dataset.pointRadius === undefined)) { + dataset.pointRadius = dataset.radius; + } + if ((dataset.hitRadius !== undefined) && (dataset.pointHitRadius === undefined)) { + dataset.pointHitRadius = dataset.hitRadius; + } + + helpers.extend(point, { + // Utility + _datasetIndex: me.index, + _index: index, + _scale: scale, + + // Desired view properties + _model: { + x: reset ? scale.xCenter : pointPosition.x, // value not used in dataset scale, but we want a consistent API between scales + y: reset ? scale.yCenter : pointPosition.y, + + // Appearance + tension: custom.tension ? custom.tension : helpers.valueOrDefault(dataset.lineTension, me.chart.options.elements.line.tension), + radius: custom.radius ? custom.radius : helpers.valueAtIndexOrDefault(dataset.pointRadius, index, pointElementOptions.radius), + backgroundColor: custom.backgroundColor ? custom.backgroundColor : helpers.valueAtIndexOrDefault(dataset.pointBackgroundColor, index, pointElementOptions.backgroundColor), + borderColor: custom.borderColor ? custom.borderColor : helpers.valueAtIndexOrDefault(dataset.pointBorderColor, index, pointElementOptions.borderColor), + borderWidth: custom.borderWidth ? custom.borderWidth : helpers.valueAtIndexOrDefault(dataset.pointBorderWidth, index, pointElementOptions.borderWidth), + pointStyle: custom.pointStyle ? custom.pointStyle : helpers.valueAtIndexOrDefault(dataset.pointStyle, index, pointElementOptions.pointStyle), + rotation: custom.rotation ? custom.rotation : helpers.valueAtIndexOrDefault(dataset.pointRotation, index, pointElementOptions.rotation), + + // Tooltip + hitRadius: custom.hitRadius ? custom.hitRadius : helpers.valueAtIndexOrDefault(dataset.pointHitRadius, index, pointElementOptions.hitRadius) + } + }); + + point._model.skip = custom.skip ? custom.skip : (isNaN(point._model.x) || isNaN(point._model.y)); + }, + updateBezierControlPoints: function() { + var chartArea = this.chart.chartArea; + var meta = this.getMeta(); + + helpers.each(meta.data, function(point, index) { + var model = point._model; + var controlPoints = helpers.splineCurve( + helpers.previousItem(meta.data, index, true)._model, + model, + helpers.nextItem(meta.data, index, true)._model, + model.tension + ); + + // Prevent the bezier going outside of the bounds of the graph + model.controlPointPreviousX = Math.max(Math.min(controlPoints.previous.x, chartArea.right), chartArea.left); + model.controlPointPreviousY = Math.max(Math.min(controlPoints.previous.y, chartArea.bottom), chartArea.top); + + model.controlPointNextX = Math.max(Math.min(controlPoints.next.x, chartArea.right), chartArea.left); + model.controlPointNextY = Math.max(Math.min(controlPoints.next.y, chartArea.bottom), chartArea.top); + + // Now pivot the point for animation + point.pivot(); + }); + }, + + setHoverStyle: function(point) { + // Point + var dataset = this.chart.data.datasets[point._datasetIndex]; + var custom = point.custom || {}; + var index = point._index; + var model = point._model; + + point.$previousStyle = { + backgroundColor: model.backgroundColor, + borderColor: model.borderColor, + borderWidth: model.borderWidth, + radius: model.radius + }; + + model.radius = custom.hoverRadius ? custom.hoverRadius : helpers.valueAtIndexOrDefault(dataset.pointHoverRadius, index, this.chart.options.elements.point.hoverRadius); + model.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : helpers.valueAtIndexOrDefault(dataset.pointHoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor)); + model.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : helpers.valueAtIndexOrDefault(dataset.pointHoverBorderColor, index, helpers.getHoverColor(model.borderColor)); + model.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : helpers.valueAtIndexOrDefault(dataset.pointHoverBorderWidth, index, model.borderWidth); + }, + }); +}; + +},{"26":26,"41":41,"46":46}],21:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); + +defaults._set('scatter', { + hover: { + mode: 'single' + }, + + scales: { + xAxes: [{ + id: 'x-axis-1', // need an ID so datasets can reference the scale + type: 'linear', // scatter should not use a category axis + position: 'bottom' + }], + yAxes: [{ + id: 'y-axis-1', + type: 'linear', + position: 'left' + }] + }, + + showLines: false, + + tooltips: { + callbacks: { + title: function() { + return ''; // doesn't make sense for scatter since data are formatted as a point + }, + label: function(item) { + return '(' + item.xLabel + ', ' + item.yLabel + ')'; + } + } + } +}); + +module.exports = function(Chart) { + + // Scatter charts use line controllers + Chart.controllers.scatter = Chart.controllers.line; + +}; + +},{"26":26}],22:[function(require,module,exports){ +'use strict'; + +var Element = require(27); + +var exports = module.exports = Element.extend({ + chart: null, // the animation associated chart instance + currentStep: 0, // the current animation step + numSteps: 60, // default number of steps + easing: '', // the easing to use for this animation + render: null, // render function used by the animation service + + onAnimationProgress: null, // user specified callback to fire on each step of the animation + onAnimationComplete: null, // user specified callback to fire when the animation finishes +}); + +// DEPRECATIONS + +/** + * Provided for backward compatibility, use Chart.Animation instead + * @prop Chart.Animation#animationObject + * @deprecated since version 2.6.0 + * @todo remove at version 3 + */ +Object.defineProperty(exports.prototype, 'animationObject', { + get: function() { + return this; + } +}); + +/** + * Provided for backward compatibility, use Chart.Animation#chart instead + * @prop Chart.Animation#chartInstance + * @deprecated since version 2.6.0 + * @todo remove at version 3 + */ +Object.defineProperty(exports.prototype, 'chartInstance', { + get: function() { + return this.chart; + }, + set: function(value) { + this.chart = value; + } +}); + +},{"27":27}],23:[function(require,module,exports){ +/* global window: false */ +'use strict'; + +var defaults = require(26); +var helpers = require(46); + +defaults._set('global', { + animation: { + duration: 1000, + easing: 'easeOutQuart', + onProgress: helpers.noop, + onComplete: helpers.noop + } +}); + +module.exports = { + frameDuration: 17, + animations: [], + dropFrames: 0, + request: null, + + /** + * @param {Chart} chart - The chart to animate. + * @param {Chart.Animation} animation - The animation that we will animate. + * @param {Number} duration - The animation duration in ms. + * @param {Boolean} lazy - if true, the chart is not marked as animating to enable more responsive interactions + */ + addAnimation: function(chart, animation, duration, lazy) { + var animations = this.animations; + var i, ilen; + + animation.chart = chart; + + if (!lazy) { + chart.animating = true; + } + + for (i = 0, ilen = animations.length; i < ilen; ++i) { + if (animations[i].chart === chart) { + animations[i] = animation; + return; + } + } + + animations.push(animation); + + // If there are no animations queued, manually kickstart a digest, for lack of a better word + if (animations.length === 1) { + this.requestAnimationFrame(); + } + }, + + cancelAnimation: function(chart) { + var index = helpers.findIndex(this.animations, function(animation) { + return animation.chart === chart; + }); + + if (index !== -1) { + this.animations.splice(index, 1); + chart.animating = false; + } + }, + + requestAnimationFrame: function() { + var me = this; + if (me.request === null) { + // Skip animation frame requests until the active one is executed. + // This can happen when processing mouse events, e.g. 'mousemove' + // and 'mouseout' events will trigger multiple renders. + me.request = helpers.requestAnimFrame.call(window, function() { + me.request = null; + me.startDigest(); + }); + } + }, + + /** + * @private + */ + startDigest: function() { + var me = this; + var startTime = Date.now(); + var framesToDrop = 0; + + if (me.dropFrames > 1) { + framesToDrop = Math.floor(me.dropFrames); + me.dropFrames = me.dropFrames % 1; + } + + me.advance(1 + framesToDrop); + + var endTime = Date.now(); + + me.dropFrames += (endTime - startTime) / me.frameDuration; + + // Do we have more stuff to animate? + if (me.animations.length > 0) { + me.requestAnimationFrame(); + } + }, + + /** + * @private + */ + advance: function(count) { + var animations = this.animations; + var animation, chart; + var i = 0; + + while (i < animations.length) { + animation = animations[i]; + chart = animation.chart; + + animation.currentStep = (animation.currentStep || 0) + count; + animation.currentStep = Math.min(animation.currentStep, animation.numSteps); + + helpers.callback(animation.render, [chart, animation], chart); + helpers.callback(animation.onAnimationProgress, [animation], chart); + + if (animation.currentStep >= animation.numSteps) { + helpers.callback(animation.onAnimationComplete, [animation], chart); + chart.animating = false; + animations.splice(i, 1); + } else { + ++i; + } + } + } +}; + +},{"26":26,"46":46}],24:[function(require,module,exports){ +'use strict'; + +var Animation = require(22); +var animations = require(23); +var defaults = require(26); +var helpers = require(46); +var Interaction = require(29); +var layouts = require(31); +var platform = require(49); +var plugins = require(32); +var scaleService = require(34); +var Tooltip = require(36); + +module.exports = function(Chart) { + + // Create a dictionary of chart types, to allow for extension of existing types + Chart.types = {}; + + // Store a reference to each instance - allowing us to globally resize chart instances on window resize. + // Destroy method on the chart will remove the instance of the chart from this reference. + Chart.instances = {}; + + // Controllers available for dataset visualization eg. bar, line, slice, etc. + Chart.controllers = {}; + + /** + * Initializes the given config with global and chart default values. + */ + function initConfig(config) { + config = config || {}; + + // Do NOT use configMerge() for the data object because this method merges arrays + // and so would change references to labels and datasets, preventing data updates. + var data = config.data = config.data || {}; + data.datasets = data.datasets || []; + data.labels = data.labels || []; + + config.options = helpers.configMerge( + defaults.global, + defaults[config.type], + config.options || {}); + + return config; + } + + /** + * Updates the config of the chart + * @param chart {Chart} chart to update the options for + */ + function updateConfig(chart) { + var newOptions = chart.options; + + helpers.each(chart.scales, function(scale) { + layouts.removeBox(chart, scale); + }); + + newOptions = helpers.configMerge( + Chart.defaults.global, + Chart.defaults[chart.config.type], + newOptions); + + chart.options = chart.config.options = newOptions; + chart.ensureScalesHaveIDs(); + chart.buildOrUpdateScales(); + // Tooltip + chart.tooltip._options = newOptions.tooltips; + chart.tooltip.initialize(); + } + + function positionIsHorizontal(position) { + return position === 'top' || position === 'bottom'; + } + + helpers.extend(Chart.prototype, /** @lends Chart */ { + /** + * @private + */ + construct: function(item, config) { + var me = this; + + config = initConfig(config); + + var context = platform.acquireContext(item, config); + var canvas = context && context.canvas; + var height = canvas && canvas.height; + var width = canvas && canvas.width; + + me.id = helpers.uid(); + me.ctx = context; + me.canvas = canvas; + me.config = config; + me.width = width; + me.height = height; + me.aspectRatio = height ? width / height : null; + me.options = config.options; + me._bufferedRender = false; + + /** + * Provided for backward compatibility, Chart and Chart.Controller have been merged, + * the "instance" still need to be defined since it might be called from plugins. + * @prop Chart#chart + * @deprecated since version 2.6.0 + * @todo remove at version 3 + * @private + */ + me.chart = me; + me.controller = me; // chart.chart.controller #inception + + // Add the chart instance to the global namespace + Chart.instances[me.id] = me; + + // Define alias to the config data: `chart.data === chart.config.data` + Object.defineProperty(me, 'data', { + get: function() { + return me.config.data; + }, + set: function(value) { + me.config.data = value; + } + }); + + if (!context || !canvas) { + // The given item is not a compatible context2d element, let's return before finalizing + // the chart initialization but after setting basic chart / controller properties that + // can help to figure out that the chart is not valid (e.g chart.canvas !== null); + // https://github.com/chartjs/Chart.js/issues/2807 + console.error("Failed to create chart: can't acquire context from the given item"); + return; + } + + me.initialize(); + me.update(); + }, + + /** + * @private + */ + initialize: function() { + var me = this; + + // Before init plugin notification + plugins.notify(me, 'beforeInit'); + + helpers.retinaScale(me, me.options.devicePixelRatio); + + me.bindEvents(); + + if (me.options.responsive) { + // Initial resize before chart draws (must be silent to preserve initial animations). + me.resize(true); + } + + // Make sure scales have IDs and are built before we build any controllers. + me.ensureScalesHaveIDs(); + me.buildOrUpdateScales(); + me.initToolTip(); + + // After init plugin notification + plugins.notify(me, 'afterInit'); + + return me; + }, + + clear: function() { + helpers.canvas.clear(this); + return this; + }, + + stop: function() { + // Stops any current animation loop occurring + animations.cancelAnimation(this); + return this; + }, + + resize: function(silent) { + var me = this; + var options = me.options; + var canvas = me.canvas; + var aspectRatio = (options.maintainAspectRatio && me.aspectRatio) || null; + + // the canvas render width and height will be casted to integers so make sure that + // the canvas display style uses the same integer values to avoid blurring effect. + + // Set to 0 instead of canvas.size because the size defaults to 300x150 if the element is collapsed + var newWidth = Math.max(0, Math.floor(helpers.getMaximumWidth(canvas))); + var newHeight = Math.max(0, Math.floor(aspectRatio ? newWidth / aspectRatio : helpers.getMaximumHeight(canvas))); + + if (me.width === newWidth && me.height === newHeight) { + return; + } + + canvas.width = me.width = newWidth; + canvas.height = me.height = newHeight; + canvas.style.width = newWidth + 'px'; + canvas.style.height = newHeight + 'px'; + + helpers.retinaScale(me, options.devicePixelRatio); + + if (!silent) { + // Notify any plugins about the resize + var newSize = {width: newWidth, height: newHeight}; + plugins.notify(me, 'resize', [newSize]); + + // Notify of resize + if (me.options.onResize) { + me.options.onResize(me, newSize); + } + + me.stop(); + me.update({ + duration: me.options.responsiveAnimationDuration + }); + } + }, + + ensureScalesHaveIDs: function() { + var options = this.options; + var scalesOptions = options.scales || {}; + var scaleOptions = options.scale; + + helpers.each(scalesOptions.xAxes, function(xAxisOptions, index) { + xAxisOptions.id = xAxisOptions.id || ('x-axis-' + index); + }); + + helpers.each(scalesOptions.yAxes, function(yAxisOptions, index) { + yAxisOptions.id = yAxisOptions.id || ('y-axis-' + index); + }); + + if (scaleOptions) { + scaleOptions.id = scaleOptions.id || 'scale'; + } + }, + + /** + * Builds a map of scale ID to scale object for future lookup. + */ + buildOrUpdateScales: function() { + var me = this; + var options = me.options; + var scales = me.scales || {}; + var items = []; + var updated = Object.keys(scales).reduce(function(obj, id) { + obj[id] = false; + return obj; + }, {}); + + if (options.scales) { + items = items.concat( + (options.scales.xAxes || []).map(function(xAxisOptions) { + return {options: xAxisOptions, dtype: 'category', dposition: 'bottom'}; + }), + (options.scales.yAxes || []).map(function(yAxisOptions) { + return {options: yAxisOptions, dtype: 'linear', dposition: 'left'}; + }) + ); + } + + if (options.scale) { + items.push({ + options: options.scale, + dtype: 'radialLinear', + isDefault: true, + dposition: 'chartArea' + }); + } + + helpers.each(items, function(item) { + var scaleOptions = item.options; + var id = scaleOptions.id; + var scaleType = helpers.valueOrDefault(scaleOptions.type, item.dtype); + + if (positionIsHorizontal(scaleOptions.position) !== positionIsHorizontal(item.dposition)) { + scaleOptions.position = item.dposition; + } + + updated[id] = true; + var scale = null; + if (id in scales && scales[id].type === scaleType) { + scale = scales[id]; + scale.options = scaleOptions; + scale.ctx = me.ctx; + scale.chart = me; + } else { + var scaleClass = scaleService.getScaleConstructor(scaleType); + if (!scaleClass) { + return; + } + scale = new scaleClass({ + id: id, + type: scaleType, + options: scaleOptions, + ctx: me.ctx, + chart: me + }); + scales[scale.id] = scale; + } + + scale.mergeTicksOptions(); + + // TODO(SB): I think we should be able to remove this custom case (options.scale) + // and consider it as a regular scale part of the "scales"" map only! This would + // make the logic easier and remove some useless? custom code. + if (item.isDefault) { + me.scale = scale; + } + }); + // clear up discarded scales + helpers.each(updated, function(hasUpdated, id) { + if (!hasUpdated) { + delete scales[id]; + } + }); + + me.scales = scales; + + scaleService.addScalesToLayout(this); + }, + + buildOrUpdateControllers: function() { + var me = this; + var types = []; + var newControllers = []; + + helpers.each(me.data.datasets, function(dataset, datasetIndex) { + var meta = me.getDatasetMeta(datasetIndex); + var type = dataset.type || me.config.type; + + if (meta.type && meta.type !== type) { + me.destroyDatasetMeta(datasetIndex); + meta = me.getDatasetMeta(datasetIndex); + } + meta.type = type; + + types.push(meta.type); + + if (meta.controller) { + meta.controller.updateIndex(datasetIndex); + meta.controller.linkScales(); + } else { + var ControllerClass = Chart.controllers[meta.type]; + if (ControllerClass === undefined) { + throw new Error('"' + meta.type + '" is not a chart type.'); + } + + meta.controller = new ControllerClass(me, datasetIndex); + newControllers.push(meta.controller); + } + }, me); + + return newControllers; + }, + + /** + * Reset the elements of all datasets + * @private + */ + resetElements: function() { + var me = this; + helpers.each(me.data.datasets, function(dataset, datasetIndex) { + me.getDatasetMeta(datasetIndex).controller.reset(); + }, me); + }, + + /** + * Resets the chart back to it's state before the initial animation + */ + reset: function() { + this.resetElements(); + this.tooltip.initialize(); + }, + + update: function(config) { + var me = this; + + if (!config || typeof config !== 'object') { + // backwards compatibility + config = { + duration: config, + lazy: arguments[1] + }; + } + + updateConfig(me); + + // plugins options references might have change, let's invalidate the cache + // https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167 + plugins._invalidate(me); + + if (plugins.notify(me, 'beforeUpdate') === false) { + return; + } + + // In case the entire data object changed + me.tooltip._data = me.data; + + // Make sure dataset controllers are updated and new controllers are reset + var newControllers = me.buildOrUpdateControllers(); + + // Make sure all dataset controllers have correct meta data counts + helpers.each(me.data.datasets, function(dataset, datasetIndex) { + me.getDatasetMeta(datasetIndex).controller.buildOrUpdateElements(); + }, me); + + me.updateLayout(); + + // Can only reset the new controllers after the scales have been updated + if (me.options.animation && me.options.animation.duration) { + helpers.each(newControllers, function(controller) { + controller.reset(); + }); + } + + me.updateDatasets(); + + // Need to reset tooltip in case it is displayed with elements that are removed + // after update. + me.tooltip.initialize(); + + // Last active contains items that were previously in the tooltip. + // When we reset the tooltip, we need to clear it + me.lastActive = []; + + // Do this before render so that any plugins that need final scale updates can use it + plugins.notify(me, 'afterUpdate'); + + if (me._bufferedRender) { + me._bufferedRequest = { + duration: config.duration, + easing: config.easing, + lazy: config.lazy + }; + } else { + me.render(config); + } + }, + + /** + * Updates the chart layout unless a plugin returns `false` to the `beforeLayout` + * hook, in which case, plugins will not be called on `afterLayout`. + * @private + */ + updateLayout: function() { + var me = this; + + if (plugins.notify(me, 'beforeLayout') === false) { + return; + } + + layouts.update(this, this.width, this.height); + + /** + * Provided for backward compatibility, use `afterLayout` instead. + * @method IPlugin#afterScaleUpdate + * @deprecated since version 2.5.0 + * @todo remove at version 3 + * @private + */ + plugins.notify(me, 'afterScaleUpdate'); + plugins.notify(me, 'afterLayout'); + }, + + /** + * Updates all datasets unless a plugin returns `false` to the `beforeDatasetsUpdate` + * hook, in which case, plugins will not be called on `afterDatasetsUpdate`. + * @private + */ + updateDatasets: function() { + var me = this; + + if (plugins.notify(me, 'beforeDatasetsUpdate') === false) { + return; + } + + for (var i = 0, ilen = me.data.datasets.length; i < ilen; ++i) { + me.updateDataset(i); + } + + plugins.notify(me, 'afterDatasetsUpdate'); + }, + + /** + * Updates dataset at index unless a plugin returns `false` to the `beforeDatasetUpdate` + * hook, in which case, plugins will not be called on `afterDatasetUpdate`. + * @private + */ + updateDataset: function(index) { + var me = this; + var meta = me.getDatasetMeta(index); + var args = { + meta: meta, + index: index + }; + + if (plugins.notify(me, 'beforeDatasetUpdate', [args]) === false) { + return; + } + + meta.controller.update(); + + plugins.notify(me, 'afterDatasetUpdate', [args]); + }, + + render: function(config) { + var me = this; + + if (!config || typeof config !== 'object') { + // backwards compatibility + config = { + duration: config, + lazy: arguments[1] + }; + } + + var duration = config.duration; + var lazy = config.lazy; + + if (plugins.notify(me, 'beforeRender') === false) { + return; + } + + var animationOptions = me.options.animation; + var onComplete = function(animation) { + plugins.notify(me, 'afterRender'); + helpers.callback(animationOptions && animationOptions.onComplete, [animation], me); + }; + + if (animationOptions && ((typeof duration !== 'undefined' && duration !== 0) || (typeof duration === 'undefined' && animationOptions.duration !== 0))) { + var animation = new Animation({ + numSteps: (duration || animationOptions.duration) / 16.66, // 60 fps + easing: config.easing || animationOptions.easing, + + render: function(chart, animationObject) { + var easingFunction = helpers.easing.effects[animationObject.easing]; + var currentStep = animationObject.currentStep; + var stepDecimal = currentStep / animationObject.numSteps; + + chart.draw(easingFunction(stepDecimal), stepDecimal, currentStep); + }, + + onAnimationProgress: animationOptions.onProgress, + onAnimationComplete: onComplete + }); + + animations.addAnimation(me, animation, duration, lazy); + } else { + me.draw(); + + // See https://github.com/chartjs/Chart.js/issues/3781 + onComplete(new Animation({numSteps: 0, chart: me})); + } + + return me; + }, + + draw: function(easingValue) { + var me = this; + + me.clear(); + + if (helpers.isNullOrUndef(easingValue)) { + easingValue = 1; + } + + me.transition(easingValue); + + if (me.width <= 0 || me.height <= 0) { + return; + } + + if (plugins.notify(me, 'beforeDraw', [easingValue]) === false) { + return; + } + + // Draw all the scales + helpers.each(me.boxes, function(box) { + box.draw(me.chartArea); + }, me); + + if (me.scale) { + me.scale.draw(); + } + + me.drawDatasets(easingValue); + me._drawTooltip(easingValue); + + plugins.notify(me, 'afterDraw', [easingValue]); + }, + + /** + * @private + */ + transition: function(easingValue) { + var me = this; + + for (var i = 0, ilen = (me.data.datasets || []).length; i < ilen; ++i) { + if (me.isDatasetVisible(i)) { + me.getDatasetMeta(i).controller.transition(easingValue); + } + } + + me.tooltip.transition(easingValue); + }, + + /** + * Draws all datasets unless a plugin returns `false` to the `beforeDatasetsDraw` + * hook, in which case, plugins will not be called on `afterDatasetsDraw`. + * @private + */ + drawDatasets: function(easingValue) { + var me = this; + + if (plugins.notify(me, 'beforeDatasetsDraw', [easingValue]) === false) { + return; + } + + // Draw datasets reversed to support proper line stacking + for (var i = (me.data.datasets || []).length - 1; i >= 0; --i) { + if (me.isDatasetVisible(i)) { + me.drawDataset(i, easingValue); + } + } + + plugins.notify(me, 'afterDatasetsDraw', [easingValue]); + }, + + /** + * Draws dataset at index unless a plugin returns `false` to the `beforeDatasetDraw` + * hook, in which case, plugins will not be called on `afterDatasetDraw`. + * @private + */ + drawDataset: function(index, easingValue) { + var me = this; + var meta = me.getDatasetMeta(index); + var args = { + meta: meta, + index: index, + easingValue: easingValue + }; + + if (plugins.notify(me, 'beforeDatasetDraw', [args]) === false) { + return; + } + + meta.controller.draw(easingValue); + + plugins.notify(me, 'afterDatasetDraw', [args]); + }, + + /** + * Draws tooltip unless a plugin returns `false` to the `beforeTooltipDraw` + * hook, in which case, plugins will not be called on `afterTooltipDraw`. + * @private + */ + _drawTooltip: function(easingValue) { + var me = this; + var tooltip = me.tooltip; + var args = { + tooltip: tooltip, + easingValue: easingValue + }; + + if (plugins.notify(me, 'beforeTooltipDraw', [args]) === false) { + return; + } + + tooltip.draw(); + + plugins.notify(me, 'afterTooltipDraw', [args]); + }, + + // Get the single element that was clicked on + // @return : An object containing the dataset index and element index of the matching element. Also contains the rectangle that was draw + getElementAtEvent: function(e) { + return Interaction.modes.single(this, e); + }, + + getElementsAtEvent: function(e) { + return Interaction.modes.label(this, e, {intersect: true}); + }, + + getElementsAtXAxis: function(e) { + return Interaction.modes['x-axis'](this, e, {intersect: true}); + }, + + getElementsAtEventForMode: function(e, mode, options) { + var method = Interaction.modes[mode]; + if (typeof method === 'function') { + return method(this, e, options); + } + + return []; + }, + + getDatasetAtEvent: function(e) { + return Interaction.modes.dataset(this, e, {intersect: true}); + }, + + getDatasetMeta: function(datasetIndex) { + var me = this; + var dataset = me.data.datasets[datasetIndex]; + if (!dataset._meta) { + dataset._meta = {}; + } + + var meta = dataset._meta[me.id]; + if (!meta) { + meta = dataset._meta[me.id] = { + type: null, + data: [], + dataset: null, + controller: null, + hidden: null, // See isDatasetVisible() comment + xAxisID: null, + yAxisID: null + }; + } + + return meta; + }, + + getVisibleDatasetCount: function() { + var count = 0; + for (var i = 0, ilen = this.data.datasets.length; i < ilen; ++i) { + if (this.isDatasetVisible(i)) { + count++; + } + } + return count; + }, + + isDatasetVisible: function(datasetIndex) { + var meta = this.getDatasetMeta(datasetIndex); + + // meta.hidden is a per chart dataset hidden flag override with 3 states: if true or false, + // the dataset.hidden value is ignored, else if null, the dataset hidden state is returned. + return typeof meta.hidden === 'boolean' ? !meta.hidden : !this.data.datasets[datasetIndex].hidden; + }, + + generateLegend: function() { + return this.options.legendCallback(this); + }, + + /** + * @private + */ + destroyDatasetMeta: function(datasetIndex) { + var id = this.id; + var dataset = this.data.datasets[datasetIndex]; + var meta = dataset._meta && dataset._meta[id]; + + if (meta) { + meta.controller.destroy(); + delete dataset._meta[id]; + } + }, + + destroy: function() { + var me = this; + var canvas = me.canvas; + var i, ilen; + + me.stop(); + + // dataset controllers need to cleanup associated data + for (i = 0, ilen = me.data.datasets.length; i < ilen; ++i) { + me.destroyDatasetMeta(i); + } + + if (canvas) { + me.unbindEvents(); + helpers.canvas.clear(me); + platform.releaseContext(me.ctx); + me.canvas = null; + me.ctx = null; + } + + plugins.notify(me, 'destroy'); + + delete Chart.instances[me.id]; + }, + + toBase64Image: function() { + return this.canvas.toDataURL.apply(this.canvas, arguments); + }, + + initToolTip: function() { + var me = this; + me.tooltip = new Tooltip({ + _chart: me, + _chartInstance: me, // deprecated, backward compatibility + _data: me.data, + _options: me.options.tooltips + }, me); + }, + + /** + * @private + */ + bindEvents: function() { + var me = this; + var listeners = me._listeners = {}; + var listener = function() { + me.eventHandler.apply(me, arguments); + }; + + helpers.each(me.options.events, function(type) { + platform.addEventListener(me, type, listener); + listeners[type] = listener; + }); + + // Elements used to detect size change should not be injected for non responsive charts. + // See https://github.com/chartjs/Chart.js/issues/2210 + if (me.options.responsive) { + listener = function() { + me.resize(); + }; + + platform.addEventListener(me, 'resize', listener); + listeners.resize = listener; + } + }, + + /** + * @private + */ + unbindEvents: function() { + var me = this; + var listeners = me._listeners; + if (!listeners) { + return; + } + + delete me._listeners; + helpers.each(listeners, function(listener, type) { + platform.removeEventListener(me, type, listener); + }); + }, + + updateHoverStyle: function(elements, mode, enabled) { + var method = enabled ? 'setHoverStyle' : 'removeHoverStyle'; + var element, i, ilen; + + for (i = 0, ilen = elements.length; i < ilen; ++i) { + element = elements[i]; + if (element) { + this.getDatasetMeta(element._datasetIndex).controller[method](element); + } + } + }, + + /** + * @private + */ + eventHandler: function(e) { + var me = this; + var tooltip = me.tooltip; + + if (plugins.notify(me, 'beforeEvent', [e]) === false) { + return; + } + + // Buffer any update calls so that renders do not occur + me._bufferedRender = true; + me._bufferedRequest = null; + + var changed = me.handleEvent(e); + // for smooth tooltip animations issue #4989 + // the tooltip should be the source of change + // Animation check workaround: + // tooltip._start will be null when tooltip isn't animating + if (tooltip) { + changed = tooltip._start + ? tooltip.handleEvent(e) + : changed | tooltip.handleEvent(e); + } + + plugins.notify(me, 'afterEvent', [e]); + + var bufferedRequest = me._bufferedRequest; + if (bufferedRequest) { + // If we have an update that was triggered, we need to do a normal render + me.render(bufferedRequest); + } else if (changed && !me.animating) { + // If entering, leaving, or changing elements, animate the change via pivot + me.stop(); + + // We only need to render at this point. Updating will cause scales to be + // recomputed generating flicker & using more memory than necessary. + me.render({ + duration: me.options.hover.animationDuration, + lazy: true + }); + } + + me._bufferedRender = false; + me._bufferedRequest = null; + + return me; + }, + + /** + * Handle an event + * @private + * @param {IEvent} event the event to handle + * @return {Boolean} true if the chart needs to re-render + */ + handleEvent: function(e) { + var me = this; + var options = me.options || {}; + var hoverOptions = options.hover; + var changed = false; + + me.lastActive = me.lastActive || []; + + // Find Active Elements for hover and tooltips + if (e.type === 'mouseout') { + me.active = []; + } else { + me.active = me.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions); + } + + // Invoke onHover hook + // Need to call with native event here to not break backwards compatibility + helpers.callback(options.onHover || options.hover.onHover, [e.native, me.active], me); + + if (e.type === 'mouseup' || e.type === 'click') { + if (options.onClick) { + // Use e.native here for backwards compatibility + options.onClick.call(me, e.native, me.active); + } + } + + // Remove styling for last active (even if it may still be active) + if (me.lastActive.length) { + me.updateHoverStyle(me.lastActive, hoverOptions.mode, false); + } + + // Built in hover styling + if (me.active.length && hoverOptions.mode) { + me.updateHoverStyle(me.active, hoverOptions.mode, true); + } + + changed = !helpers.arrayEquals(me.active, me.lastActive); + + // Remember Last Actives + me.lastActive = me.active; + + return changed; + } + }); + + /** + * Provided for backward compatibility, use Chart instead. + * @class Chart.Controller + * @deprecated since version 2.6.0 + * @todo remove at version 3 + * @private + */ + Chart.Controller = Chart; +}; + +},{"22":22,"23":23,"26":26,"29":29,"31":31,"32":32,"34":34,"36":36,"46":46,"49":49}],25:[function(require,module,exports){ +'use strict'; + +var helpers = require(46); + +module.exports = function(Chart) { + + var arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift']; + + /** + * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice', + * 'unshift') and notify the listener AFTER the array has been altered. Listeners are + * called on the 'onData*' callbacks (e.g. onDataPush, etc.) with same arguments. + */ + function listenArrayEvents(array, listener) { + if (array._chartjs) { + array._chartjs.listeners.push(listener); + return; + } + + Object.defineProperty(array, '_chartjs', { + configurable: true, + enumerable: false, + value: { + listeners: [listener] + } + }); + + arrayEvents.forEach(function(key) { + var method = 'onData' + key.charAt(0).toUpperCase() + key.slice(1); + var base = array[key]; + + Object.defineProperty(array, key, { + configurable: true, + enumerable: false, + value: function() { + var args = Array.prototype.slice.call(arguments); + var res = base.apply(this, args); + + helpers.each(array._chartjs.listeners, function(object) { + if (typeof object[method] === 'function') { + object[method].apply(object, args); + } + }); + + return res; + } + }); + }); + } + + /** + * Removes the given array event listener and cleanup extra attached properties (such as + * the _chartjs stub and overridden methods) if array doesn't have any more listeners. + */ + function unlistenArrayEvents(array, listener) { + var stub = array._chartjs; + if (!stub) { + return; + } + + var listeners = stub.listeners; + var index = listeners.indexOf(listener); + if (index !== -1) { + listeners.splice(index, 1); + } + + if (listeners.length > 0) { + return; + } + + arrayEvents.forEach(function(key) { + delete array[key]; + }); + + delete array._chartjs; + } + + // Base class for all dataset controllers (line, bar, etc) + Chart.DatasetController = function(chart, datasetIndex) { + this.initialize(chart, datasetIndex); + }; + + helpers.extend(Chart.DatasetController.prototype, { + + /** + * Element type used to generate a meta dataset (e.g. Chart.element.Line). + * @type {Chart.core.element} + */ + datasetElementType: null, + + /** + * Element type used to generate a meta data (e.g. Chart.element.Point). + * @type {Chart.core.element} + */ + dataElementType: null, + + initialize: function(chart, datasetIndex) { + var me = this; + me.chart = chart; + me.index = datasetIndex; + me.linkScales(); + me.addElements(); + }, + + updateIndex: function(datasetIndex) { + this.index = datasetIndex; + }, + + linkScales: function() { + var me = this; + var meta = me.getMeta(); + var dataset = me.getDataset(); + + if (meta.xAxisID === null || !(meta.xAxisID in me.chart.scales)) { + meta.xAxisID = dataset.xAxisID || me.chart.options.scales.xAxes[0].id; + } + if (meta.yAxisID === null || !(meta.yAxisID in me.chart.scales)) { + meta.yAxisID = dataset.yAxisID || me.chart.options.scales.yAxes[0].id; + } + }, + + getDataset: function() { + return this.chart.data.datasets[this.index]; + }, + + getMeta: function() { + return this.chart.getDatasetMeta(this.index); + }, + + getScaleForId: function(scaleID) { + return this.chart.scales[scaleID]; + }, + + reset: function() { + this.update(true); + }, + + /** + * @private + */ + destroy: function() { + if (this._data) { + unlistenArrayEvents(this._data, this); + } + }, + + createMetaDataset: function() { + var me = this; + var type = me.datasetElementType; + return type && new type({ + _chart: me.chart, + _datasetIndex: me.index + }); + }, + + createMetaData: function(index) { + var me = this; + var type = me.dataElementType; + return type && new type({ + _chart: me.chart, + _datasetIndex: me.index, + _index: index + }); + }, + + addElements: function() { + var me = this; + var meta = me.getMeta(); + var data = me.getDataset().data || []; + var metaData = meta.data; + var i, ilen; + + for (i = 0, ilen = data.length; i < ilen; ++i) { + metaData[i] = metaData[i] || me.createMetaData(i); + } + + meta.dataset = meta.dataset || me.createMetaDataset(); + }, + + addElementAndReset: function(index) { + var element = this.createMetaData(index); + this.getMeta().data.splice(index, 0, element); + this.updateElement(element, index, true); + }, + + buildOrUpdateElements: function() { + var me = this; + var dataset = me.getDataset(); + var data = dataset.data || (dataset.data = []); + + // In order to correctly handle data addition/deletion animation (an thus simulate + // real-time charts), we need to monitor these data modifications and synchronize + // the internal meta data accordingly. + if (me._data !== data) { + if (me._data) { + // This case happens when the user replaced the data array instance. + unlistenArrayEvents(me._data, me); + } + + listenArrayEvents(data, me); + me._data = data; + } + + // Re-sync meta data in case the user replaced the data array or if we missed + // any updates and so make sure that we handle number of datapoints changing. + me.resyncElements(); + }, + + update: helpers.noop, + + transition: function(easingValue) { + var meta = this.getMeta(); + var elements = meta.data || []; + var ilen = elements.length; + var i = 0; + + for (; i < ilen; ++i) { + elements[i].transition(easingValue); + } + + if (meta.dataset) { + meta.dataset.transition(easingValue); + } + }, + + draw: function() { + var meta = this.getMeta(); + var elements = meta.data || []; + var ilen = elements.length; + var i = 0; + + if (meta.dataset) { + meta.dataset.draw(); + } + + for (; i < ilen; ++i) { + elements[i].draw(); + } + }, + + removeHoverStyle: function(element) { + helpers.merge(element._model, element.$previousStyle || {}); + delete element.$previousStyle; + }, + + setHoverStyle: function(element) { + var dataset = this.chart.data.datasets[element._datasetIndex]; + var index = element._index; + var custom = element.custom || {}; + var valueOrDefault = helpers.valueAtIndexOrDefault; + var getHoverColor = helpers.getHoverColor; + var model = element._model; + + element.$previousStyle = { + backgroundColor: model.backgroundColor, + borderColor: model.borderColor, + borderWidth: model.borderWidth + }; + + model.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : valueOrDefault(dataset.hoverBackgroundColor, index, getHoverColor(model.backgroundColor)); + model.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : valueOrDefault(dataset.hoverBorderColor, index, getHoverColor(model.borderColor)); + model.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : valueOrDefault(dataset.hoverBorderWidth, index, model.borderWidth); + }, + + /** + * @private + */ + resyncElements: function() { + var me = this; + var meta = me.getMeta(); + var data = me.getDataset().data; + var numMeta = meta.data.length; + var numData = data.length; + + if (numData < numMeta) { + meta.data.splice(numData, numMeta - numData); + } else if (numData > numMeta) { + me.insertElements(numMeta, numData - numMeta); + } + }, + + /** + * @private + */ + insertElements: function(start, count) { + for (var i = 0; i < count; ++i) { + this.addElementAndReset(start + i); + } + }, + + /** + * @private + */ + onDataPush: function() { + this.insertElements(this.getDataset().data.length - 1, arguments.length); + }, + + /** + * @private + */ + onDataPop: function() { + this.getMeta().data.pop(); + }, + + /** + * @private + */ + onDataShift: function() { + this.getMeta().data.shift(); + }, + + /** + * @private + */ + onDataSplice: function(start, count) { + this.getMeta().data.splice(start, count); + this.insertElements(start, arguments.length - 2); + }, + + /** + * @private + */ + onDataUnshift: function() { + this.insertElements(0, arguments.length); + } + }); + + Chart.DatasetController.extend = helpers.inherits; +}; + +},{"46":46}],26:[function(require,module,exports){ +'use strict'; + +var helpers = require(46); + +module.exports = { + /** + * @private + */ + _set: function(scope, values) { + return helpers.merge(this[scope] || (this[scope] = {}), values); + } +}; + +},{"46":46}],27:[function(require,module,exports){ +'use strict'; + +var color = require(2); +var helpers = require(46); + +function interpolate(start, view, model, ease) { + var keys = Object.keys(model); + var i, ilen, key, actual, origin, target, type, c0, c1; + + for (i = 0, ilen = keys.length; i < ilen; ++i) { + key = keys[i]; + + target = model[key]; + + // if a value is added to the model after pivot() has been called, the view + // doesn't contain it, so let's initialize the view to the target value. + if (!view.hasOwnProperty(key)) { + view[key] = target; + } + + actual = view[key]; + + if (actual === target || key[0] === '_') { + continue; + } + + if (!start.hasOwnProperty(key)) { + start[key] = actual; + } + + origin = start[key]; + + type = typeof target; + + if (type === typeof origin) { + if (type === 'string') { + c0 = color(origin); + if (c0.valid) { + c1 = color(target); + if (c1.valid) { + view[key] = c1.mix(c0, ease).rgbString(); + continue; + } + } + } else if (type === 'number' && isFinite(origin) && isFinite(target)) { + view[key] = origin + (target - origin) * ease; + continue; + } + } + + view[key] = target; + } +} + +var Element = function(configuration) { + helpers.extend(this, configuration); + this.initialize.apply(this, arguments); +}; + +helpers.extend(Element.prototype, { + + initialize: function() { + this.hidden = false; + }, + + pivot: function() { + var me = this; + if (!me._view) { + me._view = helpers.clone(me._model); + } + me._start = {}; + return me; + }, + + transition: function(ease) { + var me = this; + var model = me._model; + var start = me._start; + var view = me._view; + + // No animation -> No Transition + if (!model || ease === 1) { + me._view = model; + me._start = null; + return me; + } + + if (!view) { + view = me._view = {}; + } + + if (!start) { + start = me._start = {}; + } + + interpolate(start, view, model, ease); + + return me; + }, + + tooltipPosition: function() { + return { + x: this._model.x, + y: this._model.y + }; + }, + + hasValue: function() { + return helpers.isNumber(this._model.x) && helpers.isNumber(this._model.y); + } +}); + +Element.extend = helpers.inherits; + +module.exports = Element; + +},{"2":2,"46":46}],28:[function(require,module,exports){ +/* global window: false */ +/* global document: false */ +'use strict'; + +var color = require(2); +var defaults = require(26); +var helpers = require(46); +var scaleService = require(34); + +module.exports = function() { + + // -- Basic js utility methods + + helpers.configMerge = function(/* objects ... */) { + return helpers.merge(helpers.clone(arguments[0]), [].slice.call(arguments, 1), { + merger: function(key, target, source, options) { + var tval = target[key] || {}; + var sval = source[key]; + + if (key === 'scales') { + // scale config merging is complex. Add our own function here for that + target[key] = helpers.scaleMerge(tval, sval); + } else if (key === 'scale') { + // used in polar area & radar charts since there is only one scale + target[key] = helpers.merge(tval, [scaleService.getScaleDefaults(sval.type), sval]); + } else { + helpers._merger(key, target, source, options); + } + } + }); + }; + + helpers.scaleMerge = function(/* objects ... */) { + return helpers.merge(helpers.clone(arguments[0]), [].slice.call(arguments, 1), { + merger: function(key, target, source, options) { + if (key === 'xAxes' || key === 'yAxes') { + var slen = source[key].length; + var i, type, scale; + + if (!target[key]) { + target[key] = []; + } + + for (i = 0; i < slen; ++i) { + scale = source[key][i]; + type = helpers.valueOrDefault(scale.type, key === 'xAxes' ? 'category' : 'linear'); + + if (i >= target[key].length) { + target[key].push({}); + } + + if (!target[key][i].type || (scale.type && scale.type !== target[key][i].type)) { + // new/untyped scale or type changed: let's apply the new defaults + // then merge source scale to correctly overwrite the defaults. + helpers.merge(target[key][i], [scaleService.getScaleDefaults(type), scale]); + } else { + // scales type are the same + helpers.merge(target[key][i], scale); + } + } + } else { + helpers._merger(key, target, source, options); + } + } + }); + }; + + helpers.where = function(collection, filterCallback) { + if (helpers.isArray(collection) && Array.prototype.filter) { + return collection.filter(filterCallback); + } + var filtered = []; + + helpers.each(collection, function(item) { + if (filterCallback(item)) { + filtered.push(item); + } + }); + + return filtered; + }; + helpers.findIndex = Array.prototype.findIndex ? + function(array, callback, scope) { + return array.findIndex(callback, scope); + } : + function(array, callback, scope) { + scope = scope === undefined ? array : scope; + for (var i = 0, ilen = array.length; i < ilen; ++i) { + if (callback.call(scope, array[i], i, array)) { + return i; + } + } + return -1; + }; + helpers.findNextWhere = function(arrayToSearch, filterCallback, startIndex) { + // Default to start of the array + if (helpers.isNullOrUndef(startIndex)) { + startIndex = -1; + } + for (var i = startIndex + 1; i < arrayToSearch.length; i++) { + var currentItem = arrayToSearch[i]; + if (filterCallback(currentItem)) { + return currentItem; + } + } + }; + helpers.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex) { + // Default to end of the array + if (helpers.isNullOrUndef(startIndex)) { + startIndex = arrayToSearch.length; + } + for (var i = startIndex - 1; i >= 0; i--) { + var currentItem = arrayToSearch[i]; + if (filterCallback(currentItem)) { + return currentItem; + } + } + }; + + // -- Math methods + helpers.isNumber = function(n) { + return !isNaN(parseFloat(n)) && isFinite(n); + }; + helpers.almostEquals = function(x, y, epsilon) { + return Math.abs(x - y) < epsilon; + }; + helpers.almostWhole = function(x, epsilon) { + var rounded = Math.round(x); + return (((rounded - epsilon) < x) && ((rounded + epsilon) > x)); + }; + helpers.max = function(array) { + return array.reduce(function(max, value) { + if (!isNaN(value)) { + return Math.max(max, value); + } + return max; + }, Number.NEGATIVE_INFINITY); + }; + helpers.min = function(array) { + return array.reduce(function(min, value) { + if (!isNaN(value)) { + return Math.min(min, value); + } + return min; + }, Number.POSITIVE_INFINITY); + }; + helpers.sign = Math.sign ? + function(x) { + return Math.sign(x); + } : + function(x) { + x = +x; // convert to a number + if (x === 0 || isNaN(x)) { + return x; + } + return x > 0 ? 1 : -1; + }; + helpers.log10 = Math.log10 ? + function(x) { + return Math.log10(x); + } : + function(x) { + var exponent = Math.log(x) * Math.LOG10E; // Math.LOG10E = 1 / Math.LN10. + // Check for whole powers of 10, + // which due to floating point rounding error should be corrected. + var powerOf10 = Math.round(exponent); + var isPowerOf10 = x === Math.pow(10, powerOf10); + + return isPowerOf10 ? powerOf10 : exponent; + }; + helpers.toRadians = function(degrees) { + return degrees * (Math.PI / 180); + }; + helpers.toDegrees = function(radians) { + return radians * (180 / Math.PI); + }; + // Gets the angle from vertical upright to the point about a centre. + helpers.getAngleFromPoint = function(centrePoint, anglePoint) { + var distanceFromXCenter = anglePoint.x - centrePoint.x; + var distanceFromYCenter = anglePoint.y - centrePoint.y; + var radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter); + + var angle = Math.atan2(distanceFromYCenter, distanceFromXCenter); + + if (angle < (-0.5 * Math.PI)) { + angle += 2.0 * Math.PI; // make sure the returned angle is in the range of (-PI/2, 3PI/2] + } + + return { + angle: angle, + distance: radialDistanceFromCenter + }; + }; + helpers.distanceBetweenPoints = function(pt1, pt2) { + return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2)); + }; + helpers.aliasPixel = function(pixelWidth) { + return (pixelWidth % 2 === 0) ? 0 : 0.5; + }; + helpers.splineCurve = function(firstPoint, middlePoint, afterPoint, t) { + // Props to Rob Spencer at scaled innovation for his post on splining between points + // http://scaledinnovation.com/analytics/splines/aboutSplines.html + + // This function must also respect "skipped" points + + var previous = firstPoint.skip ? middlePoint : firstPoint; + var current = middlePoint; + var next = afterPoint.skip ? middlePoint : afterPoint; + + var d01 = Math.sqrt(Math.pow(current.x - previous.x, 2) + Math.pow(current.y - previous.y, 2)); + var d12 = Math.sqrt(Math.pow(next.x - current.x, 2) + Math.pow(next.y - current.y, 2)); + + var s01 = d01 / (d01 + d12); + var s12 = d12 / (d01 + d12); + + // If all points are the same, s01 & s02 will be inf + s01 = isNaN(s01) ? 0 : s01; + s12 = isNaN(s12) ? 0 : s12; + + var fa = t * s01; // scaling factor for triangle Ta + var fb = t * s12; + + return { + previous: { + x: current.x - fa * (next.x - previous.x), + y: current.y - fa * (next.y - previous.y) + }, + next: { + x: current.x + fb * (next.x - previous.x), + y: current.y + fb * (next.y - previous.y) + } + }; + }; + helpers.EPSILON = Number.EPSILON || 1e-14; + helpers.splineCurveMonotone = function(points) { + // This function calculates Bézier control points in a similar way than |splineCurve|, + // but preserves monotonicity of the provided data and ensures no local extremums are added + // between the dataset discrete points due to the interpolation. + // See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation + + var pointsWithTangents = (points || []).map(function(point) { + return { + model: point._model, + deltaK: 0, + mK: 0 + }; + }); + + // Calculate slopes (deltaK) and initialize tangents (mK) + var pointsLen = pointsWithTangents.length; + var i, pointBefore, pointCurrent, pointAfter; + for (i = 0; i < pointsLen; ++i) { + pointCurrent = pointsWithTangents[i]; + if (pointCurrent.model.skip) { + continue; + } + + pointBefore = i > 0 ? pointsWithTangents[i - 1] : null; + pointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null; + if (pointAfter && !pointAfter.model.skip) { + var slopeDeltaX = (pointAfter.model.x - pointCurrent.model.x); + + // In the case of two points that appear at the same x pixel, slopeDeltaX is 0 + pointCurrent.deltaK = slopeDeltaX !== 0 ? (pointAfter.model.y - pointCurrent.model.y) / slopeDeltaX : 0; + } + + if (!pointBefore || pointBefore.model.skip) { + pointCurrent.mK = pointCurrent.deltaK; + } else if (!pointAfter || pointAfter.model.skip) { + pointCurrent.mK = pointBefore.deltaK; + } else if (this.sign(pointBefore.deltaK) !== this.sign(pointCurrent.deltaK)) { + pointCurrent.mK = 0; + } else { + pointCurrent.mK = (pointBefore.deltaK + pointCurrent.deltaK) / 2; + } + } + + // Adjust tangents to ensure monotonic properties + var alphaK, betaK, tauK, squaredMagnitude; + for (i = 0; i < pointsLen - 1; ++i) { + pointCurrent = pointsWithTangents[i]; + pointAfter = pointsWithTangents[i + 1]; + if (pointCurrent.model.skip || pointAfter.model.skip) { + continue; + } + + if (helpers.almostEquals(pointCurrent.deltaK, 0, this.EPSILON)) { + pointCurrent.mK = pointAfter.mK = 0; + continue; + } + + alphaK = pointCurrent.mK / pointCurrent.deltaK; + betaK = pointAfter.mK / pointCurrent.deltaK; + squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2); + if (squaredMagnitude <= 9) { + continue; + } + + tauK = 3 / Math.sqrt(squaredMagnitude); + pointCurrent.mK = alphaK * tauK * pointCurrent.deltaK; + pointAfter.mK = betaK * tauK * pointCurrent.deltaK; + } + + // Compute control points + var deltaX; + for (i = 0; i < pointsLen; ++i) { + pointCurrent = pointsWithTangents[i]; + if (pointCurrent.model.skip) { + continue; + } + + pointBefore = i > 0 ? pointsWithTangents[i - 1] : null; + pointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null; + if (pointBefore && !pointBefore.model.skip) { + deltaX = (pointCurrent.model.x - pointBefore.model.x) / 3; + pointCurrent.model.controlPointPreviousX = pointCurrent.model.x - deltaX; + pointCurrent.model.controlPointPreviousY = pointCurrent.model.y - deltaX * pointCurrent.mK; + } + if (pointAfter && !pointAfter.model.skip) { + deltaX = (pointAfter.model.x - pointCurrent.model.x) / 3; + pointCurrent.model.controlPointNextX = pointCurrent.model.x + deltaX; + pointCurrent.model.controlPointNextY = pointCurrent.model.y + deltaX * pointCurrent.mK; + } + } + }; + helpers.nextItem = function(collection, index, loop) { + if (loop) { + return index >= collection.length - 1 ? collection[0] : collection[index + 1]; + } + return index >= collection.length - 1 ? collection[collection.length - 1] : collection[index + 1]; + }; + helpers.previousItem = function(collection, index, loop) { + if (loop) { + return index <= 0 ? collection[collection.length - 1] : collection[index - 1]; + } + return index <= 0 ? collection[0] : collection[index - 1]; + }; + // Implementation of the nice number algorithm used in determining where axis labels will go + helpers.niceNum = function(range, round) { + var exponent = Math.floor(helpers.log10(range)); + var fraction = range / Math.pow(10, exponent); + var niceFraction; + + if (round) { + if (fraction < 1.5) { + niceFraction = 1; + } else if (fraction < 3) { + niceFraction = 2; + } else if (fraction < 7) { + niceFraction = 5; + } else { + niceFraction = 10; + } + } else if (fraction <= 1.0) { + niceFraction = 1; + } else if (fraction <= 2) { + niceFraction = 2; + } else if (fraction <= 5) { + niceFraction = 5; + } else { + niceFraction = 10; + } + + return niceFraction * Math.pow(10, exponent); + }; + // Request animation polyfill - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/ + helpers.requestAnimFrame = (function() { + if (typeof window === 'undefined') { + return function(callback) { + callback(); + }; + } + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function(callback) { + return window.setTimeout(callback, 1000 / 60); + }; + }()); + // -- DOM methods + helpers.getRelativePosition = function(evt, chart) { + var mouseX, mouseY; + var e = evt.originalEvent || evt; + var canvas = evt.target || evt.srcElement; + var boundingRect = canvas.getBoundingClientRect(); + + var touches = e.touches; + if (touches && touches.length > 0) { + mouseX = touches[0].clientX; + mouseY = touches[0].clientY; + + } else { + mouseX = e.clientX; + mouseY = e.clientY; + } + + // Scale mouse coordinates into canvas coordinates + // by following the pattern laid out by 'jerryj' in the comments of + // http://www.html5canvastutorials.com/advanced/html5-canvas-mouse-coordinates/ + var paddingLeft = parseFloat(helpers.getStyle(canvas, 'padding-left')); + var paddingTop = parseFloat(helpers.getStyle(canvas, 'padding-top')); + var paddingRight = parseFloat(helpers.getStyle(canvas, 'padding-right')); + var paddingBottom = parseFloat(helpers.getStyle(canvas, 'padding-bottom')); + var width = boundingRect.right - boundingRect.left - paddingLeft - paddingRight; + var height = boundingRect.bottom - boundingRect.top - paddingTop - paddingBottom; + + // We divide by the current device pixel ratio, because the canvas is scaled up by that amount in each direction. However + // the backend model is in unscaled coordinates. Since we are going to deal with our model coordinates, we go back here + mouseX = Math.round((mouseX - boundingRect.left - paddingLeft) / (width) * canvas.width / chart.currentDevicePixelRatio); + mouseY = Math.round((mouseY - boundingRect.top - paddingTop) / (height) * canvas.height / chart.currentDevicePixelRatio); + + return { + x: mouseX, + y: mouseY + }; + + }; + + // Private helper function to convert max-width/max-height values that may be percentages into a number + function parseMaxStyle(styleValue, node, parentProperty) { + var valueInPixels; + if (typeof styleValue === 'string') { + valueInPixels = parseInt(styleValue, 10); + + if (styleValue.indexOf('%') !== -1) { + // percentage * size in dimension + valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty]; + } + } else { + valueInPixels = styleValue; + } + + return valueInPixels; + } + + /** + * Returns if the given value contains an effective constraint. + * @private + */ + function isConstrainedValue(value) { + return value !== undefined && value !== null && value !== 'none'; + } + + // Private helper to get a constraint dimension + // @param domNode : the node to check the constraint on + // @param maxStyle : the style that defines the maximum for the direction we are using (maxWidth / maxHeight) + // @param percentageProperty : property of parent to use when calculating width as a percentage + // @see http://www.nathanaeljones.com/blog/2013/reading-max-width-cross-browser + function getConstraintDimension(domNode, maxStyle, percentageProperty) { + var view = document.defaultView; + var parentNode = helpers._getParentNode(domNode); + var constrainedNode = view.getComputedStyle(domNode)[maxStyle]; + var constrainedContainer = view.getComputedStyle(parentNode)[maxStyle]; + var hasCNode = isConstrainedValue(constrainedNode); + var hasCContainer = isConstrainedValue(constrainedContainer); + var infinity = Number.POSITIVE_INFINITY; + + if (hasCNode || hasCContainer) { + return Math.min( + hasCNode ? parseMaxStyle(constrainedNode, domNode, percentageProperty) : infinity, + hasCContainer ? parseMaxStyle(constrainedContainer, parentNode, percentageProperty) : infinity); + } + + return 'none'; + } + // returns Number or undefined if no constraint + helpers.getConstraintWidth = function(domNode) { + return getConstraintDimension(domNode, 'max-width', 'clientWidth'); + }; + // returns Number or undefined if no constraint + helpers.getConstraintHeight = function(domNode) { + return getConstraintDimension(domNode, 'max-height', 'clientHeight'); + }; + /** + * @private + */ + helpers._calculatePadding = function(container, padding, parentDimension) { + padding = helpers.getStyle(container, padding); + + return padding.indexOf('%') > -1 ? parentDimension / parseInt(padding, 10) : parseInt(padding, 10); + }; + /** + * @private + */ + helpers._getParentNode = function(domNode) { + var parent = domNode.parentNode; + if (parent && parent.host) { + parent = parent.host; + } + return parent; + }; + helpers.getMaximumWidth = function(domNode) { + var container = helpers._getParentNode(domNode); + if (!container) { + return domNode.clientWidth; + } + + var clientWidth = container.clientWidth; + var paddingLeft = helpers._calculatePadding(container, 'padding-left', clientWidth); + var paddingRight = helpers._calculatePadding(container, 'padding-right', clientWidth); + + var w = clientWidth - paddingLeft - paddingRight; + var cw = helpers.getConstraintWidth(domNode); + return isNaN(cw) ? w : Math.min(w, cw); + }; + helpers.getMaximumHeight = function(domNode) { + var container = helpers._getParentNode(domNode); + if (!container) { + return domNode.clientHeight; + } + + var clientHeight = container.clientHeight; + var paddingTop = helpers._calculatePadding(container, 'padding-top', clientHeight); + var paddingBottom = helpers._calculatePadding(container, 'padding-bottom', clientHeight); + + var h = clientHeight - paddingTop - paddingBottom; + var ch = helpers.getConstraintHeight(domNode); + return isNaN(ch) ? h : Math.min(h, ch); + }; + helpers.getStyle = function(el, property) { + return el.currentStyle ? + el.currentStyle[property] : + document.defaultView.getComputedStyle(el, null).getPropertyValue(property); + }; + helpers.retinaScale = function(chart, forceRatio) { + var pixelRatio = chart.currentDevicePixelRatio = forceRatio || (typeof window !== 'undefined' && window.devicePixelRatio) || 1; + if (pixelRatio === 1) { + return; + } + + var canvas = chart.canvas; + var height = chart.height; + var width = chart.width; + + canvas.height = height * pixelRatio; + canvas.width = width * pixelRatio; + chart.ctx.scale(pixelRatio, pixelRatio); + + // If no style has been set on the canvas, the render size is used as display size, + // making the chart visually bigger, so let's enforce it to the "correct" values. + // See https://github.com/chartjs/Chart.js/issues/3575 + if (!canvas.style.height && !canvas.style.width) { + canvas.style.height = height + 'px'; + canvas.style.width = width + 'px'; + } + }; + // -- Canvas methods + helpers.fontString = function(pixelSize, fontStyle, fontFamily) { + return fontStyle + ' ' + pixelSize + 'px ' + fontFamily; + }; + helpers.longestText = function(ctx, font, arrayOfThings, cache) { + cache = cache || {}; + var data = cache.data = cache.data || {}; + var gc = cache.garbageCollect = cache.garbageCollect || []; + + if (cache.font !== font) { + data = cache.data = {}; + gc = cache.garbageCollect = []; + cache.font = font; + } + + ctx.font = font; + var longest = 0; + helpers.each(arrayOfThings, function(thing) { + // Undefined strings and arrays should not be measured + if (thing !== undefined && thing !== null && helpers.isArray(thing) !== true) { + longest = helpers.measureText(ctx, data, gc, longest, thing); + } else if (helpers.isArray(thing)) { + // if it is an array lets measure each element + // to do maybe simplify this function a bit so we can do this more recursively? + helpers.each(thing, function(nestedThing) { + // Undefined strings and arrays should not be measured + if (nestedThing !== undefined && nestedThing !== null && !helpers.isArray(nestedThing)) { + longest = helpers.measureText(ctx, data, gc, longest, nestedThing); + } + }); + } + }); + + var gcLen = gc.length / 2; + if (gcLen > arrayOfThings.length) { + for (var i = 0; i < gcLen; i++) { + delete data[gc[i]]; + } + gc.splice(0, gcLen); + } + return longest; + }; + helpers.measureText = function(ctx, data, gc, longest, string) { + var textWidth = data[string]; + if (!textWidth) { + textWidth = data[string] = ctx.measureText(string).width; + gc.push(string); + } + if (textWidth > longest) { + longest = textWidth; + } + return longest; + }; + helpers.numberOfLabelLines = function(arrayOfThings) { + var numberOfLines = 1; + helpers.each(arrayOfThings, function(thing) { + if (helpers.isArray(thing)) { + if (thing.length > numberOfLines) { + numberOfLines = thing.length; + } + } + }); + return numberOfLines; + }; + + helpers.color = !color ? + function(value) { + console.error('Color.js not found!'); + return value; + } : + function(value) { + /* global CanvasGradient */ + if (value instanceof CanvasGradient) { + value = defaults.global.defaultColor; + } + + return color(value); + }; + + helpers.getHoverColor = function(colorValue) { + /* global CanvasPattern */ + return (colorValue instanceof CanvasPattern) ? + colorValue : + helpers.color(colorValue).saturate(0.5).darken(0.1).rgbString(); + }; +}; + +},{"2":2,"26":26,"34":34,"46":46}],29:[function(require,module,exports){ +'use strict'; + +var helpers = require(46); + +/** + * Helper function to get relative position for an event + * @param {Event|IEvent} event - The event to get the position for + * @param {Chart} chart - The chart + * @returns {Point} the event position + */ +function getRelativePosition(e, chart) { + if (e.native) { + return { + x: e.x, + y: e.y + }; + } + + return helpers.getRelativePosition(e, chart); +} + +/** + * Helper function to traverse all of the visible elements in the chart + * @param chart {chart} the chart + * @param handler {Function} the callback to execute for each visible item + */ +function parseVisibleItems(chart, handler) { + var datasets = chart.data.datasets; + var meta, i, j, ilen, jlen; + + for (i = 0, ilen = datasets.length; i < ilen; ++i) { + if (!chart.isDatasetVisible(i)) { + continue; + } + + meta = chart.getDatasetMeta(i); + for (j = 0, jlen = meta.data.length; j < jlen; ++j) { + var element = meta.data[j]; + if (!element._view.skip) { + handler(element); + } + } + } +} + +/** + * Helper function to get the items that intersect the event position + * @param items {ChartElement[]} elements to filter + * @param position {Point} the point to be nearest to + * @return {ChartElement[]} the nearest items + */ +function getIntersectItems(chart, position) { + var elements = []; + + parseVisibleItems(chart, function(element) { + if (element.inRange(position.x, position.y)) { + elements.push(element); + } + }); + + return elements; +} + +/** + * Helper function to get the items nearest to the event position considering all visible items in teh chart + * @param chart {Chart} the chart to look at elements from + * @param position {Point} the point to be nearest to + * @param intersect {Boolean} if true, only consider items that intersect the position + * @param distanceMetric {Function} function to provide the distance between points + * @return {ChartElement[]} the nearest items + */ +function getNearestItems(chart, position, intersect, distanceMetric) { + var minDistance = Number.POSITIVE_INFINITY; + var nearestItems = []; + + parseVisibleItems(chart, function(element) { + if (intersect && !element.inRange(position.x, position.y)) { + return; + } + + var center = element.getCenterPoint(); + var distance = distanceMetric(position, center); + + if (distance < minDistance) { + nearestItems = [element]; + minDistance = distance; + } else if (distance === minDistance) { + // Can have multiple items at the same distance in which case we sort by size + nearestItems.push(element); + } + }); + + return nearestItems; +} + +/** + * Get a distance metric function for two points based on the + * axis mode setting + * @param {String} axis the axis mode. x|y|xy + */ +function getDistanceMetricForAxis(axis) { + var useX = axis.indexOf('x') !== -1; + var useY = axis.indexOf('y') !== -1; + + return function(pt1, pt2) { + var deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0; + var deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0; + return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2)); + }; +} + +function indexMode(chart, e, options) { + var position = getRelativePosition(e, chart); + // Default axis for index mode is 'x' to match old behaviour + options.axis = options.axis || 'x'; + var distanceMetric = getDistanceMetricForAxis(options.axis); + var items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric); + var elements = []; + + if (!items.length) { + return []; + } + + chart.data.datasets.forEach(function(dataset, datasetIndex) { + if (chart.isDatasetVisible(datasetIndex)) { + var meta = chart.getDatasetMeta(datasetIndex); + var element = meta.data[items[0]._index]; + + // don't count items that are skipped (null data) + if (element && !element._view.skip) { + elements.push(element); + } + } + }); + + return elements; +} + +/** + * @interface IInteractionOptions + */ +/** + * If true, only consider items that intersect the point + * @name IInterfaceOptions#boolean + * @type Boolean + */ + +/** + * Contains interaction related functions + * @namespace Chart.Interaction + */ +module.exports = { + // Helper function for different modes + modes: { + single: function(chart, e) { + var position = getRelativePosition(e, chart); + var elements = []; + + parseVisibleItems(chart, function(element) { + if (element.inRange(position.x, position.y)) { + elements.push(element); + return elements; + } + }); + + return elements.slice(0, 1); + }, + + /** + * @function Chart.Interaction.modes.label + * @deprecated since version 2.4.0 + * @todo remove at version 3 + * @private + */ + label: indexMode, + + /** + * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something + * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item + * @function Chart.Interaction.modes.index + * @since v2.4.0 + * @param chart {chart} the chart we are returning items from + * @param e {Event} the event we are find things at + * @param options {IInteractionOptions} options to use during interaction + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + index: indexMode, + + /** + * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something + * If the options.intersect is false, we find the nearest item and return the items in that dataset + * @function Chart.Interaction.modes.dataset + * @param chart {chart} the chart we are returning items from + * @param e {Event} the event we are find things at + * @param options {IInteractionOptions} options to use during interaction + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + dataset: function(chart, e, options) { + var position = getRelativePosition(e, chart); + options.axis = options.axis || 'xy'; + var distanceMetric = getDistanceMetricForAxis(options.axis); + var items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric); + + if (items.length > 0) { + items = chart.getDatasetMeta(items[0]._datasetIndex).data; + } + + return items; + }, + + /** + * @function Chart.Interaction.modes.x-axis + * @deprecated since version 2.4.0. Use index mode and intersect == true + * @todo remove at version 3 + * @private + */ + 'x-axis': function(chart, e) { + return indexMode(chart, e, {intersect: false}); + }, + + /** + * Point mode returns all elements that hit test based on the event position + * of the event + * @function Chart.Interaction.modes.intersect + * @param chart {chart} the chart we are returning items from + * @param e {Event} the event we are find things at + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + point: function(chart, e) { + var position = getRelativePosition(e, chart); + return getIntersectItems(chart, position); + }, + + /** + * nearest mode returns the element closest to the point + * @function Chart.Interaction.modes.intersect + * @param chart {chart} the chart we are returning items from + * @param e {Event} the event we are find things at + * @param options {IInteractionOptions} options to use + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + nearest: function(chart, e, options) { + var position = getRelativePosition(e, chart); + options.axis = options.axis || 'xy'; + var distanceMetric = getDistanceMetricForAxis(options.axis); + var nearestItems = getNearestItems(chart, position, options.intersect, distanceMetric); + + // We have multiple items at the same distance from the event. Now sort by smallest + if (nearestItems.length > 1) { + nearestItems.sort(function(a, b) { + var sizeA = a.getArea(); + var sizeB = b.getArea(); + var ret = sizeA - sizeB; + + if (ret === 0) { + // if equal sort by dataset index + ret = a._datasetIndex - b._datasetIndex; + } + + return ret; + }); + } + + // Return only 1 item + return nearestItems.slice(0, 1); + }, + + /** + * x mode returns the elements that hit-test at the current x coordinate + * @function Chart.Interaction.modes.x + * @param chart {chart} the chart we are returning items from + * @param e {Event} the event we are find things at + * @param options {IInteractionOptions} options to use + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + x: function(chart, e, options) { + var position = getRelativePosition(e, chart); + var items = []; + var intersectsItem = false; + + parseVisibleItems(chart, function(element) { + if (element.inXRange(position.x)) { + items.push(element); + } + + if (element.inRange(position.x, position.y)) { + intersectsItem = true; + } + }); + + // If we want to trigger on an intersect and we don't have any items + // that intersect the position, return nothing + if (options.intersect && !intersectsItem) { + items = []; + } + return items; + }, + + /** + * y mode returns the elements that hit-test at the current y coordinate + * @function Chart.Interaction.modes.y + * @param chart {chart} the chart we are returning items from + * @param e {Event} the event we are find things at + * @param options {IInteractionOptions} options to use + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + y: function(chart, e, options) { + var position = getRelativePosition(e, chart); + var items = []; + var intersectsItem = false; + + parseVisibleItems(chart, function(element) { + if (element.inYRange(position.y)) { + items.push(element); + } + + if (element.inRange(position.x, position.y)) { + intersectsItem = true; + } + }); + + // If we want to trigger on an intersect and we don't have any items + // that intersect the position, return nothing + if (options.intersect && !intersectsItem) { + items = []; + } + return items; + } + } +}; + +},{"46":46}],30:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); + +defaults._set('global', { + responsive: true, + responsiveAnimationDuration: 0, + maintainAspectRatio: true, + events: ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove'], + hover: { + onHover: null, + mode: 'nearest', + intersect: true, + animationDuration: 400 + }, + onClick: null, + defaultColor: 'rgba(0,0,0,0.1)', + defaultFontColor: '#666', + defaultFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", + defaultFontSize: 12, + defaultFontStyle: 'normal', + showLines: true, + + // Element defaults defined in element extensions + elements: {}, + + // Layout options such as padding + layout: { + padding: { + top: 0, + right: 0, + bottom: 0, + left: 0 + } + } +}); + +module.exports = function() { + + // Occupy the global variable of Chart, and create a simple base class + var Chart = function(item, config) { + this.construct(item, config); + return this; + }; + + Chart.Chart = Chart; + + return Chart; +}; + +},{"26":26}],31:[function(require,module,exports){ +'use strict'; + +var helpers = require(46); + +function filterByPosition(array, position) { + return helpers.where(array, function(v) { + return v.position === position; + }); +} + +function sortByWeight(array, reverse) { + array.forEach(function(v, i) { + v._tmpIndex_ = i; + return v; + }); + array.sort(function(a, b) { + var v0 = reverse ? b : a; + var v1 = reverse ? a : b; + return v0.weight === v1.weight ? + v0._tmpIndex_ - v1._tmpIndex_ : + v0.weight - v1.weight; + }); + array.forEach(function(v) { + delete v._tmpIndex_; + }); +} + +/** + * @interface ILayoutItem + * @prop {String} position - The position of the item in the chart layout. Possible values are + * 'left', 'top', 'right', 'bottom', and 'chartArea' + * @prop {Number} weight - The weight used to sort the item. Higher weights are further away from the chart area + * @prop {Boolean} fullWidth - if true, and the item is horizontal, then push vertical boxes down + * @prop {Function} isHorizontal - returns true if the layout item is horizontal (ie. top or bottom) + * @prop {Function} update - Takes two parameters: width and height. Returns size of item + * @prop {Function} getPadding - Returns an object with padding on the edges + * @prop {Number} width - Width of item. Must be valid after update() + * @prop {Number} height - Height of item. Must be valid after update() + * @prop {Number} left - Left edge of the item. Set by layout system and cannot be used in update + * @prop {Number} top - Top edge of the item. Set by layout system and cannot be used in update + * @prop {Number} right - Right edge of the item. Set by layout system and cannot be used in update + * @prop {Number} bottom - Bottom edge of the item. Set by layout system and cannot be used in update + */ + +// The layout service is very self explanatory. It's responsible for the layout within a chart. +// Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need +// It is this service's responsibility of carrying out that layout. +module.exports = { + defaults: {}, + + /** + * Register a box to a chart. + * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title. + * @param {Chart} chart - the chart to use + * @param {ILayoutItem} item - the item to add to be layed out + */ + addBox: function(chart, item) { + if (!chart.boxes) { + chart.boxes = []; + } + + // initialize item with default values + item.fullWidth = item.fullWidth || false; + item.position = item.position || 'top'; + item.weight = item.weight || 0; + + chart.boxes.push(item); + }, + + /** + * Remove a layoutItem from a chart + * @param {Chart} chart - the chart to remove the box from + * @param {Object} layoutItem - the item to remove from the layout + */ + removeBox: function(chart, layoutItem) { + var index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1; + if (index !== -1) { + chart.boxes.splice(index, 1); + } + }, + + /** + * Sets (or updates) options on the given `item`. + * @param {Chart} chart - the chart in which the item lives (or will be added to) + * @param {Object} item - the item to configure with the given options + * @param {Object} options - the new item options. + */ + configure: function(chart, item, options) { + var props = ['fullWidth', 'position', 'weight']; + var ilen = props.length; + var i = 0; + var prop; + + for (; i < ilen; ++i) { + prop = props[i]; + if (options.hasOwnProperty(prop)) { + item[prop] = options[prop]; + } + } + }, + + /** + * Fits boxes of the given chart into the given size by having each box measure itself + * then running a fitting algorithm + * @param {Chart} chart - the chart + * @param {Number} width - the width to fit into + * @param {Number} height - the height to fit into + */ + update: function(chart, width, height) { + if (!chart) { + return; + } + + var layoutOptions = chart.options.layout || {}; + var padding = helpers.options.toPadding(layoutOptions.padding); + var leftPadding = padding.left; + var rightPadding = padding.right; + var topPadding = padding.top; + var bottomPadding = padding.bottom; + + var leftBoxes = filterByPosition(chart.boxes, 'left'); + var rightBoxes = filterByPosition(chart.boxes, 'right'); + var topBoxes = filterByPosition(chart.boxes, 'top'); + var bottomBoxes = filterByPosition(chart.boxes, 'bottom'); + var chartAreaBoxes = filterByPosition(chart.boxes, 'chartArea'); + + // Sort boxes by weight. A higher weight is further away from the chart area + sortByWeight(leftBoxes, true); + sortByWeight(rightBoxes, false); + sortByWeight(topBoxes, true); + sortByWeight(bottomBoxes, false); + + // Essentially we now have any number of boxes on each of the 4 sides. + // Our canvas looks like the following. + // The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and + // B1 is the bottom axis + // There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays + // These locations are single-box locations only, when trying to register a chartArea location that is already taken, + // an error will be thrown. + // + // |----------------------------------------------------| + // | T1 (Full Width) | + // |----------------------------------------------------| + // | | | T2 | | + // | |----|-------------------------------------|----| + // | | | C1 | | C2 | | + // | | |----| |----| | + // | | | | | + // | L1 | L2 | ChartArea (C0) | R1 | + // | | | | | + // | | |----| |----| | + // | | | C3 | | C4 | | + // | |----|-------------------------------------|----| + // | | | B1 | | + // |----------------------------------------------------| + // | B2 (Full Width) | + // |----------------------------------------------------| + // + // What we do to find the best sizing, we do the following + // 1. Determine the minimum size of the chart area. + // 2. Split the remaining width equally between each vertical axis + // 3. Split the remaining height equally between each horizontal axis + // 4. Give each layout the maximum size it can be. The layout will return it's minimum size + // 5. Adjust the sizes of each axis based on it's minimum reported size. + // 6. Refit each axis + // 7. Position each axis in the final location + // 8. Tell the chart the final location of the chart area + // 9. Tell any axes that overlay the chart area the positions of the chart area + + // Step 1 + var chartWidth = width - leftPadding - rightPadding; + var chartHeight = height - topPadding - bottomPadding; + var chartAreaWidth = chartWidth / 2; // min 50% + var chartAreaHeight = chartHeight / 2; // min 50% + + // Step 2 + var verticalBoxWidth = (width - chartAreaWidth) / (leftBoxes.length + rightBoxes.length); + + // Step 3 + var horizontalBoxHeight = (height - chartAreaHeight) / (topBoxes.length + bottomBoxes.length); + + // Step 4 + var maxChartAreaWidth = chartWidth; + var maxChartAreaHeight = chartHeight; + var minBoxSizes = []; + + function getMinimumBoxSize(box) { + var minSize; + var isHorizontal = box.isHorizontal(); + + if (isHorizontal) { + minSize = box.update(box.fullWidth ? chartWidth : maxChartAreaWidth, horizontalBoxHeight); + maxChartAreaHeight -= minSize.height; + } else { + minSize = box.update(verticalBoxWidth, maxChartAreaHeight); + maxChartAreaWidth -= minSize.width; + } + + minBoxSizes.push({ + horizontal: isHorizontal, + minSize: minSize, + box: box, + }); + } + + helpers.each(leftBoxes.concat(rightBoxes, topBoxes, bottomBoxes), getMinimumBoxSize); + + // If a horizontal box has padding, we move the left boxes over to avoid ugly charts (see issue #2478) + var maxHorizontalLeftPadding = 0; + var maxHorizontalRightPadding = 0; + var maxVerticalTopPadding = 0; + var maxVerticalBottomPadding = 0; + + helpers.each(topBoxes.concat(bottomBoxes), function(horizontalBox) { + if (horizontalBox.getPadding) { + var boxPadding = horizontalBox.getPadding(); + maxHorizontalLeftPadding = Math.max(maxHorizontalLeftPadding, boxPadding.left); + maxHorizontalRightPadding = Math.max(maxHorizontalRightPadding, boxPadding.right); + } + }); + + helpers.each(leftBoxes.concat(rightBoxes), function(verticalBox) { + if (verticalBox.getPadding) { + var boxPadding = verticalBox.getPadding(); + maxVerticalTopPadding = Math.max(maxVerticalTopPadding, boxPadding.top); + maxVerticalBottomPadding = Math.max(maxVerticalBottomPadding, boxPadding.bottom); + } + }); + + // At this point, maxChartAreaHeight and maxChartAreaWidth are the size the chart area could + // be if the axes are drawn at their minimum sizes. + // Steps 5 & 6 + var totalLeftBoxesWidth = leftPadding; + var totalRightBoxesWidth = rightPadding; + var totalTopBoxesHeight = topPadding; + var totalBottomBoxesHeight = bottomPadding; + + // Function to fit a box + function fitBox(box) { + var minBoxSize = helpers.findNextWhere(minBoxSizes, function(minBox) { + return minBox.box === box; + }); + + if (minBoxSize) { + if (box.isHorizontal()) { + var scaleMargin = { + left: Math.max(totalLeftBoxesWidth, maxHorizontalLeftPadding), + right: Math.max(totalRightBoxesWidth, maxHorizontalRightPadding), + top: 0, + bottom: 0 + }; + + // Don't use min size here because of label rotation. When the labels are rotated, their rotation highly depends + // on the margin. Sometimes they need to increase in size slightly + box.update(box.fullWidth ? chartWidth : maxChartAreaWidth, chartHeight / 2, scaleMargin); + } else { + box.update(minBoxSize.minSize.width, maxChartAreaHeight); + } + } + } + + // Update, and calculate the left and right margins for the horizontal boxes + helpers.each(leftBoxes.concat(rightBoxes), fitBox); + + helpers.each(leftBoxes, function(box) { + totalLeftBoxesWidth += box.width; + }); + + helpers.each(rightBoxes, function(box) { + totalRightBoxesWidth += box.width; + }); + + // Set the Left and Right margins for the horizontal boxes + helpers.each(topBoxes.concat(bottomBoxes), fitBox); + + // Figure out how much margin is on the top and bottom of the vertical boxes + helpers.each(topBoxes, function(box) { + totalTopBoxesHeight += box.height; + }); + + helpers.each(bottomBoxes, function(box) { + totalBottomBoxesHeight += box.height; + }); + + function finalFitVerticalBox(box) { + var minBoxSize = helpers.findNextWhere(minBoxSizes, function(minSize) { + return minSize.box === box; + }); + + var scaleMargin = { + left: 0, + right: 0, + top: totalTopBoxesHeight, + bottom: totalBottomBoxesHeight + }; + + if (minBoxSize) { + box.update(minBoxSize.minSize.width, maxChartAreaHeight, scaleMargin); + } + } + + // Let the left layout know the final margin + helpers.each(leftBoxes.concat(rightBoxes), finalFitVerticalBox); + + // Recalculate because the size of each layout might have changed slightly due to the margins (label rotation for instance) + totalLeftBoxesWidth = leftPadding; + totalRightBoxesWidth = rightPadding; + totalTopBoxesHeight = topPadding; + totalBottomBoxesHeight = bottomPadding; + + helpers.each(leftBoxes, function(box) { + totalLeftBoxesWidth += box.width; + }); + + helpers.each(rightBoxes, function(box) { + totalRightBoxesWidth += box.width; + }); + + helpers.each(topBoxes, function(box) { + totalTopBoxesHeight += box.height; + }); + helpers.each(bottomBoxes, function(box) { + totalBottomBoxesHeight += box.height; + }); + + // We may be adding some padding to account for rotated x axis labels + var leftPaddingAddition = Math.max(maxHorizontalLeftPadding - totalLeftBoxesWidth, 0); + totalLeftBoxesWidth += leftPaddingAddition; + totalRightBoxesWidth += Math.max(maxHorizontalRightPadding - totalRightBoxesWidth, 0); + + var topPaddingAddition = Math.max(maxVerticalTopPadding - totalTopBoxesHeight, 0); + totalTopBoxesHeight += topPaddingAddition; + totalBottomBoxesHeight += Math.max(maxVerticalBottomPadding - totalBottomBoxesHeight, 0); + + // Figure out if our chart area changed. This would occur if the dataset layout label rotation + // changed due to the application of the margins in step 6. Since we can only get bigger, this is safe to do + // without calling `fit` again + var newMaxChartAreaHeight = height - totalTopBoxesHeight - totalBottomBoxesHeight; + var newMaxChartAreaWidth = width - totalLeftBoxesWidth - totalRightBoxesWidth; + + if (newMaxChartAreaWidth !== maxChartAreaWidth || newMaxChartAreaHeight !== maxChartAreaHeight) { + helpers.each(leftBoxes, function(box) { + box.height = newMaxChartAreaHeight; + }); + + helpers.each(rightBoxes, function(box) { + box.height = newMaxChartAreaHeight; + }); + + helpers.each(topBoxes, function(box) { + if (!box.fullWidth) { + box.width = newMaxChartAreaWidth; + } + }); + + helpers.each(bottomBoxes, function(box) { + if (!box.fullWidth) { + box.width = newMaxChartAreaWidth; + } + }); + + maxChartAreaHeight = newMaxChartAreaHeight; + maxChartAreaWidth = newMaxChartAreaWidth; + } + + // Step 7 - Position the boxes + var left = leftPadding + leftPaddingAddition; + var top = topPadding + topPaddingAddition; + + function placeBox(box) { + if (box.isHorizontal()) { + box.left = box.fullWidth ? leftPadding : totalLeftBoxesWidth; + box.right = box.fullWidth ? width - rightPadding : totalLeftBoxesWidth + maxChartAreaWidth; + box.top = top; + box.bottom = top + box.height; + + // Move to next point + top = box.bottom; + + } else { + + box.left = left; + box.right = left + box.width; + box.top = totalTopBoxesHeight; + box.bottom = totalTopBoxesHeight + maxChartAreaHeight; + + // Move to next point + left = box.right; + } + } + + helpers.each(leftBoxes.concat(topBoxes), placeBox); + + // Account for chart width and height + left += maxChartAreaWidth; + top += maxChartAreaHeight; + + helpers.each(rightBoxes, placeBox); + helpers.each(bottomBoxes, placeBox); + + // Step 8 + chart.chartArea = { + left: totalLeftBoxesWidth, + top: totalTopBoxesHeight, + right: totalLeftBoxesWidth + maxChartAreaWidth, + bottom: totalTopBoxesHeight + maxChartAreaHeight + }; + + // Step 9 + helpers.each(chartAreaBoxes, function(box) { + box.left = chart.chartArea.left; + box.top = chart.chartArea.top; + box.right = chart.chartArea.right; + box.bottom = chart.chartArea.bottom; + + box.update(maxChartAreaWidth, maxChartAreaHeight); + }); + } +}; + +},{"46":46}],32:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var helpers = require(46); + +defaults._set('global', { + plugins: {} +}); + +/** + * The plugin service singleton + * @namespace Chart.plugins + * @since 2.1.0 + */ +module.exports = { + /** + * Globally registered plugins. + * @private + */ + _plugins: [], + + /** + * This identifier is used to invalidate the descriptors cache attached to each chart + * when a global plugin is registered or unregistered. In this case, the cache ID is + * incremented and descriptors are regenerated during following API calls. + * @private + */ + _cacheId: 0, + + /** + * Registers the given plugin(s) if not already registered. + * @param {Array|Object} plugins plugin instance(s). + */ + register: function(plugins) { + var p = this._plugins; + ([]).concat(plugins).forEach(function(plugin) { + if (p.indexOf(plugin) === -1) { + p.push(plugin); + } + }); + + this._cacheId++; + }, + + /** + * Unregisters the given plugin(s) only if registered. + * @param {Array|Object} plugins plugin instance(s). + */ + unregister: function(plugins) { + var p = this._plugins; + ([]).concat(plugins).forEach(function(plugin) { + var idx = p.indexOf(plugin); + if (idx !== -1) { + p.splice(idx, 1); + } + }); + + this._cacheId++; + }, + + /** + * Remove all registered plugins. + * @since 2.1.5 + */ + clear: function() { + this._plugins = []; + this._cacheId++; + }, + + /** + * Returns the number of registered plugins? + * @returns {Number} + * @since 2.1.5 + */ + count: function() { + return this._plugins.length; + }, + + /** + * Returns all registered plugin instances. + * @returns {Array} array of plugin objects. + * @since 2.1.5 + */ + getAll: function() { + return this._plugins; + }, + + /** + * Calls enabled plugins for `chart` on the specified hook and with the given args. + * This method immediately returns as soon as a plugin explicitly returns false. The + * returned value can be used, for instance, to interrupt the current action. + * @param {Object} chart - The chart instance for which plugins should be called. + * @param {String} hook - The name of the plugin method to call (e.g. 'beforeUpdate'). + * @param {Array} [args] - Extra arguments to apply to the hook call. + * @returns {Boolean} false if any of the plugins return false, else returns true. + */ + notify: function(chart, hook, args) { + var descriptors = this.descriptors(chart); + var ilen = descriptors.length; + var i, descriptor, plugin, params, method; + + for (i = 0; i < ilen; ++i) { + descriptor = descriptors[i]; + plugin = descriptor.plugin; + method = plugin[hook]; + if (typeof method === 'function') { + params = [chart].concat(args || []); + params.push(descriptor.options); + if (method.apply(plugin, params) === false) { + return false; + } + } + } + + return true; + }, + + /** + * Returns descriptors of enabled plugins for the given chart. + * @returns {Array} [{ plugin, options }] + * @private + */ + descriptors: function(chart) { + var cache = chart.$plugins || (chart.$plugins = {}); + if (cache.id === this._cacheId) { + return cache.descriptors; + } + + var plugins = []; + var descriptors = []; + var config = (chart && chart.config) || {}; + var options = (config.options && config.options.plugins) || {}; + + this._plugins.concat(config.plugins || []).forEach(function(plugin) { + var idx = plugins.indexOf(plugin); + if (idx !== -1) { + return; + } + + var id = plugin.id; + var opts = options[id]; + if (opts === false) { + return; + } + + if (opts === true) { + opts = helpers.clone(defaults.global.plugins[id]); + } + + plugins.push(plugin); + descriptors.push({ + plugin: plugin, + options: opts || {} + }); + }); + + cache.descriptors = descriptors; + cache.id = this._cacheId; + return descriptors; + }, + + /** + * Invalidates cache for the given chart: descriptors hold a reference on plugin option, + * but in some cases, this reference can be changed by the user when updating options. + * https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167 + * @private + */ + _invalidate: function(chart) { + delete chart.$plugins; + } +}; + +/** + * Plugin extension hooks. + * @interface IPlugin + * @since 2.1.0 + */ +/** + * @method IPlugin#beforeInit + * @desc Called before initializing `chart`. + * @param {Chart.Controller} chart - The chart instance. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#afterInit + * @desc Called after `chart` has been initialized and before the first update. + * @param {Chart.Controller} chart - The chart instance. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#beforeUpdate + * @desc Called before updating `chart`. If any plugin returns `false`, the update + * is cancelled (and thus subsequent render(s)) until another `update` is triggered. + * @param {Chart.Controller} chart - The chart instance. + * @param {Object} options - The plugin options. + * @returns {Boolean} `false` to cancel the chart update. + */ +/** + * @method IPlugin#afterUpdate + * @desc Called after `chart` has been updated and before rendering. Note that this + * hook will not be called if the chart update has been previously cancelled. + * @param {Chart.Controller} chart - The chart instance. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#beforeDatasetsUpdate + * @desc Called before updating the `chart` datasets. If any plugin returns `false`, + * the datasets update is cancelled until another `update` is triggered. + * @param {Chart.Controller} chart - The chart instance. + * @param {Object} options - The plugin options. + * @returns {Boolean} false to cancel the datasets update. + * @since version 2.1.5 +*/ +/** + * @method IPlugin#afterDatasetsUpdate + * @desc Called after the `chart` datasets have been updated. Note that this hook + * will not be called if the datasets update has been previously cancelled. + * @param {Chart.Controller} chart - The chart instance. + * @param {Object} options - The plugin options. + * @since version 2.1.5 + */ +/** + * @method IPlugin#beforeDatasetUpdate + * @desc Called before updating the `chart` dataset at the given `args.index`. If any plugin + * returns `false`, the datasets update is cancelled until another `update` is triggered. + * @param {Chart} chart - The chart instance. + * @param {Object} args - The call arguments. + * @param {Number} args.index - The dataset index. + * @param {Object} args.meta - The dataset metadata. + * @param {Object} options - The plugin options. + * @returns {Boolean} `false` to cancel the chart datasets drawing. + */ +/** + * @method IPlugin#afterDatasetUpdate + * @desc Called after the `chart` datasets at the given `args.index` has been updated. Note + * that this hook will not be called if the datasets update has been previously cancelled. + * @param {Chart} chart - The chart instance. + * @param {Object} args - The call arguments. + * @param {Number} args.index - The dataset index. + * @param {Object} args.meta - The dataset metadata. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#beforeLayout + * @desc Called before laying out `chart`. If any plugin returns `false`, + * the layout update is cancelled until another `update` is triggered. + * @param {Chart.Controller} chart - The chart instance. + * @param {Object} options - The plugin options. + * @returns {Boolean} `false` to cancel the chart layout. + */ +/** + * @method IPlugin#afterLayout + * @desc Called after the `chart` has been layed out. Note that this hook will not + * be called if the layout update has been previously cancelled. + * @param {Chart.Controller} chart - The chart instance. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#beforeRender + * @desc Called before rendering `chart`. If any plugin returns `false`, + * the rendering is cancelled until another `render` is triggered. + * @param {Chart.Controller} chart - The chart instance. + * @param {Object} options - The plugin options. + * @returns {Boolean} `false` to cancel the chart rendering. + */ +/** + * @method IPlugin#afterRender + * @desc Called after the `chart` has been fully rendered (and animation completed). Note + * that this hook will not be called if the rendering has been previously cancelled. + * @param {Chart.Controller} chart - The chart instance. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#beforeDraw + * @desc Called before drawing `chart` at every animation frame specified by the given + * easing value. If any plugin returns `false`, the frame drawing is cancelled until + * another `render` is triggered. + * @param {Chart.Controller} chart - The chart instance. + * @param {Number} easingValue - The current animation value, between 0.0 and 1.0. + * @param {Object} options - The plugin options. + * @returns {Boolean} `false` to cancel the chart drawing. + */ +/** + * @method IPlugin#afterDraw + * @desc Called after the `chart` has been drawn for the specific easing value. Note + * that this hook will not be called if the drawing has been previously cancelled. + * @param {Chart.Controller} chart - The chart instance. + * @param {Number} easingValue - The current animation value, between 0.0 and 1.0. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#beforeDatasetsDraw + * @desc Called before drawing the `chart` datasets. If any plugin returns `false`, + * the datasets drawing is cancelled until another `render` is triggered. + * @param {Chart.Controller} chart - The chart instance. + * @param {Number} easingValue - The current animation value, between 0.0 and 1.0. + * @param {Object} options - The plugin options. + * @returns {Boolean} `false` to cancel the chart datasets drawing. + */ +/** + * @method IPlugin#afterDatasetsDraw + * @desc Called after the `chart` datasets have been drawn. Note that this hook + * will not be called if the datasets drawing has been previously cancelled. + * @param {Chart.Controller} chart - The chart instance. + * @param {Number} easingValue - The current animation value, between 0.0 and 1.0. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#beforeDatasetDraw + * @desc Called before drawing the `chart` dataset at the given `args.index` (datasets + * are drawn in the reverse order). If any plugin returns `false`, the datasets drawing + * is cancelled until another `render` is triggered. + * @param {Chart} chart - The chart instance. + * @param {Object} args - The call arguments. + * @param {Number} args.index - The dataset index. + * @param {Object} args.meta - The dataset metadata. + * @param {Number} args.easingValue - The current animation value, between 0.0 and 1.0. + * @param {Object} options - The plugin options. + * @returns {Boolean} `false` to cancel the chart datasets drawing. + */ +/** + * @method IPlugin#afterDatasetDraw + * @desc Called after the `chart` datasets at the given `args.index` have been drawn + * (datasets are drawn in the reverse order). Note that this hook will not be called + * if the datasets drawing has been previously cancelled. + * @param {Chart} chart - The chart instance. + * @param {Object} args - The call arguments. + * @param {Number} args.index - The dataset index. + * @param {Object} args.meta - The dataset metadata. + * @param {Number} args.easingValue - The current animation value, between 0.0 and 1.0. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#beforeTooltipDraw + * @desc Called before drawing the `tooltip`. If any plugin returns `false`, + * the tooltip drawing is cancelled until another `render` is triggered. + * @param {Chart} chart - The chart instance. + * @param {Object} args - The call arguments. + * @param {Object} args.tooltip - The tooltip. + * @param {Number} args.easingValue - The current animation value, between 0.0 and 1.0. + * @param {Object} options - The plugin options. + * @returns {Boolean} `false` to cancel the chart tooltip drawing. + */ +/** + * @method IPlugin#afterTooltipDraw + * @desc Called after drawing the `tooltip`. Note that this hook will not + * be called if the tooltip drawing has been previously cancelled. + * @param {Chart} chart - The chart instance. + * @param {Object} args - The call arguments. + * @param {Object} args.tooltip - The tooltip. + * @param {Number} args.easingValue - The current animation value, between 0.0 and 1.0. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#beforeEvent + * @desc Called before processing the specified `event`. If any plugin returns `false`, + * the event will be discarded. + * @param {Chart.Controller} chart - The chart instance. + * @param {IEvent} event - The event object. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#afterEvent + * @desc Called after the `event` has been consumed. Note that this hook + * will not be called if the `event` has been previously discarded. + * @param {Chart.Controller} chart - The chart instance. + * @param {IEvent} event - The event object. + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#resize + * @desc Called after the chart as been resized. + * @param {Chart.Controller} chart - The chart instance. + * @param {Number} size - The new canvas display size (eq. canvas.style width & height). + * @param {Object} options - The plugin options. + */ +/** + * @method IPlugin#destroy + * @desc Called after the chart as been destroyed. + * @param {Chart.Controller} chart - The chart instance. + * @param {Object} options - The plugin options. + */ + +},{"26":26,"46":46}],33:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var Element = require(27); +var helpers = require(46); +var Ticks = require(35); + +defaults._set('scale', { + display: true, + position: 'left', + offset: false, + + // grid line settings + gridLines: { + display: true, + color: 'rgba(0, 0, 0, 0.1)', + lineWidth: 1, + drawBorder: true, + drawOnChartArea: true, + drawTicks: true, + tickMarkLength: 10, + zeroLineWidth: 1, + zeroLineColor: 'rgba(0,0,0,0.25)', + zeroLineBorderDash: [], + zeroLineBorderDashOffset: 0.0, + offsetGridLines: false, + borderDash: [], + borderDashOffset: 0.0 + }, + + // scale label + scaleLabel: { + // display property + display: false, + + // actual label + labelString: '', + + // line height + lineHeight: 1.2, + + // top/bottom padding + padding: { + top: 4, + bottom: 4 + } + }, + + // label settings + ticks: { + beginAtZero: false, + minRotation: 0, + maxRotation: 50, + mirror: false, + padding: 0, + reverse: false, + display: true, + autoSkip: true, + autoSkipPadding: 0, + labelOffset: 0, + // We pass through arrays to be rendered as multiline labels, we convert Others to strings here. + callback: Ticks.formatters.values, + minor: {}, + major: {} + } +}); + +function labelsFromTicks(ticks) { + var labels = []; + var i, ilen; + + for (i = 0, ilen = ticks.length; i < ilen; ++i) { + labels.push(ticks[i].label); + } + + return labels; +} + +function getLineValue(scale, index, offsetGridLines) { + var lineValue = scale.getPixelForTick(index); + + if (offsetGridLines) { + if (index === 0) { + lineValue -= (scale.getPixelForTick(1) - lineValue) / 2; + } else { + lineValue -= (lineValue - scale.getPixelForTick(index - 1)) / 2; + } + } + return lineValue; +} + +function computeTextSize(context, tick, font) { + return helpers.isArray(tick) ? + helpers.longestText(context, font, tick) : + context.measureText(tick).width; +} + +function parseFontOptions(options) { + var valueOrDefault = helpers.valueOrDefault; + var globalDefaults = defaults.global; + var size = valueOrDefault(options.fontSize, globalDefaults.defaultFontSize); + var style = valueOrDefault(options.fontStyle, globalDefaults.defaultFontStyle); + var family = valueOrDefault(options.fontFamily, globalDefaults.defaultFontFamily); + + return { + size: size, + style: style, + family: family, + font: helpers.fontString(size, style, family) + }; +} + +function parseLineHeight(options) { + return helpers.options.toLineHeight( + helpers.valueOrDefault(options.lineHeight, 1.2), + helpers.valueOrDefault(options.fontSize, defaults.global.defaultFontSize)); +} + +module.exports = Element.extend({ + /** + * Get the padding needed for the scale + * @method getPadding + * @private + * @returns {Padding} the necessary padding + */ + getPadding: function() { + var me = this; + return { + left: me.paddingLeft || 0, + top: me.paddingTop || 0, + right: me.paddingRight || 0, + bottom: me.paddingBottom || 0 + }; + }, + + /** + * Returns the scale tick objects ({label, major}) + * @since 2.7 + */ + getTicks: function() { + return this._ticks; + }, + + // These methods are ordered by lifecyle. Utilities then follow. + // Any function defined here is inherited by all scale types. + // Any function can be extended by the scale type + + mergeTicksOptions: function() { + var ticks = this.options.ticks; + if (ticks.minor === false) { + ticks.minor = { + display: false + }; + } + if (ticks.major === false) { + ticks.major = { + display: false + }; + } + for (var key in ticks) { + if (key !== 'major' && key !== 'minor') { + if (typeof ticks.minor[key] === 'undefined') { + ticks.minor[key] = ticks[key]; + } + if (typeof ticks.major[key] === 'undefined') { + ticks.major[key] = ticks[key]; + } + } + } + }, + beforeUpdate: function() { + helpers.callback(this.options.beforeUpdate, [this]); + }, + + update: function(maxWidth, maxHeight, margins) { + var me = this; + var i, ilen, labels, label, ticks, tick; + + // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;) + me.beforeUpdate(); + + // Absorb the master measurements + me.maxWidth = maxWidth; + me.maxHeight = maxHeight; + me.margins = helpers.extend({ + left: 0, + right: 0, + top: 0, + bottom: 0 + }, margins); + me.longestTextCache = me.longestTextCache || {}; + + // Dimensions + me.beforeSetDimensions(); + me.setDimensions(); + me.afterSetDimensions(); + + // Data min/max + me.beforeDataLimits(); + me.determineDataLimits(); + me.afterDataLimits(); + + // Ticks - `this.ticks` is now DEPRECATED! + // Internal ticks are now stored as objects in the PRIVATE `this._ticks` member + // and must not be accessed directly from outside this class. `this.ticks` being + // around for long time and not marked as private, we can't change its structure + // without unexpected breaking changes. If you need to access the scale ticks, + // use scale.getTicks() instead. + + me.beforeBuildTicks(); + + // New implementations should return an array of objects but for BACKWARD COMPAT, + // we still support no return (`this.ticks` internally set by calling this method). + ticks = me.buildTicks() || []; + + me.afterBuildTicks(); + + me.beforeTickToLabelConversion(); + + // New implementations should return the formatted tick labels but for BACKWARD + // COMPAT, we still support no return (`this.ticks` internally changed by calling + // this method and supposed to contain only string values). + labels = me.convertTicksToLabels(ticks) || me.ticks; + + me.afterTickToLabelConversion(); + + me.ticks = labels; // BACKWARD COMPATIBILITY + + // IMPORTANT: from this point, we consider that `this.ticks` will NEVER change! + + // BACKWARD COMPAT: synchronize `_ticks` with labels (so potentially `this.ticks`) + for (i = 0, ilen = labels.length; i < ilen; ++i) { + label = labels[i]; + tick = ticks[i]; + if (!tick) { + ticks.push(tick = { + label: label, + major: false + }); + } else { + tick.label = label; + } + } + + me._ticks = ticks; + + // Tick Rotation + me.beforeCalculateTickRotation(); + me.calculateTickRotation(); + me.afterCalculateTickRotation(); + // Fit + me.beforeFit(); + me.fit(); + me.afterFit(); + // + me.afterUpdate(); + + return me.minSize; + + }, + afterUpdate: function() { + helpers.callback(this.options.afterUpdate, [this]); + }, + + // + + beforeSetDimensions: function() { + helpers.callback(this.options.beforeSetDimensions, [this]); + }, + setDimensions: function() { + var me = this; + // Set the unconstrained dimension before label rotation + if (me.isHorizontal()) { + // Reset position before calculating rotation + me.width = me.maxWidth; + me.left = 0; + me.right = me.width; + } else { + me.height = me.maxHeight; + + // Reset position before calculating rotation + me.top = 0; + me.bottom = me.height; + } + + // Reset padding + me.paddingLeft = 0; + me.paddingTop = 0; + me.paddingRight = 0; + me.paddingBottom = 0; + }, + afterSetDimensions: function() { + helpers.callback(this.options.afterSetDimensions, [this]); + }, + + // Data limits + beforeDataLimits: function() { + helpers.callback(this.options.beforeDataLimits, [this]); + }, + determineDataLimits: helpers.noop, + afterDataLimits: function() { + helpers.callback(this.options.afterDataLimits, [this]); + }, + + // + beforeBuildTicks: function() { + helpers.callback(this.options.beforeBuildTicks, [this]); + }, + buildTicks: helpers.noop, + afterBuildTicks: function() { + helpers.callback(this.options.afterBuildTicks, [this]); + }, + + beforeTickToLabelConversion: function() { + helpers.callback(this.options.beforeTickToLabelConversion, [this]); + }, + convertTicksToLabels: function() { + var me = this; + // Convert ticks to strings + var tickOpts = me.options.ticks; + me.ticks = me.ticks.map(tickOpts.userCallback || tickOpts.callback, this); + }, + afterTickToLabelConversion: function() { + helpers.callback(this.options.afterTickToLabelConversion, [this]); + }, + + // + + beforeCalculateTickRotation: function() { + helpers.callback(this.options.beforeCalculateTickRotation, [this]); + }, + calculateTickRotation: function() { + var me = this; + var context = me.ctx; + var tickOpts = me.options.ticks; + var labels = labelsFromTicks(me._ticks); + + // Get the width of each grid by calculating the difference + // between x offsets between 0 and 1. + var tickFont = parseFontOptions(tickOpts); + context.font = tickFont.font; + + var labelRotation = tickOpts.minRotation || 0; + + if (labels.length && me.options.display && me.isHorizontal()) { + var originalLabelWidth = helpers.longestText(context, tickFont.font, labels, me.longestTextCache); + var labelWidth = originalLabelWidth; + var cosRotation, sinRotation; + + // Allow 3 pixels x2 padding either side for label readability + var tickWidth = me.getPixelForTick(1) - me.getPixelForTick(0) - 6; + + // Max label rotation can be set or default to 90 - also act as a loop counter + while (labelWidth > tickWidth && labelRotation < tickOpts.maxRotation) { + var angleRadians = helpers.toRadians(labelRotation); + cosRotation = Math.cos(angleRadians); + sinRotation = Math.sin(angleRadians); + + if (sinRotation * originalLabelWidth > me.maxHeight) { + // go back one step + labelRotation--; + break; + } + + labelRotation++; + labelWidth = cosRotation * originalLabelWidth; + } + } + + me.labelRotation = labelRotation; + }, + afterCalculateTickRotation: function() { + helpers.callback(this.options.afterCalculateTickRotation, [this]); + }, + + // + + beforeFit: function() { + helpers.callback(this.options.beforeFit, [this]); + }, + fit: function() { + var me = this; + // Reset + var minSize = me.minSize = { + width: 0, + height: 0 + }; + + var labels = labelsFromTicks(me._ticks); + + var opts = me.options; + var tickOpts = opts.ticks; + var scaleLabelOpts = opts.scaleLabel; + var gridLineOpts = opts.gridLines; + var display = opts.display; + var isHorizontal = me.isHorizontal(); + + var tickFont = parseFontOptions(tickOpts); + var tickMarkLength = opts.gridLines.tickMarkLength; + + // Width + if (isHorizontal) { + // subtract the margins to line up with the chartArea if we are a full width scale + minSize.width = me.isFullWidth() ? me.maxWidth - me.margins.left - me.margins.right : me.maxWidth; + } else { + minSize.width = display && gridLineOpts.drawTicks ? tickMarkLength : 0; + } + + // height + if (isHorizontal) { + minSize.height = display && gridLineOpts.drawTicks ? tickMarkLength : 0; + } else { + minSize.height = me.maxHeight; // fill all the height + } + + // Are we showing a title for the scale? + if (scaleLabelOpts.display && display) { + var scaleLabelLineHeight = parseLineHeight(scaleLabelOpts); + var scaleLabelPadding = helpers.options.toPadding(scaleLabelOpts.padding); + var deltaHeight = scaleLabelLineHeight + scaleLabelPadding.height; + + if (isHorizontal) { + minSize.height += deltaHeight; + } else { + minSize.width += deltaHeight; + } + } + + // Don't bother fitting the ticks if we are not showing them + if (tickOpts.display && display) { + var largestTextWidth = helpers.longestText(me.ctx, tickFont.font, labels, me.longestTextCache); + var tallestLabelHeightInLines = helpers.numberOfLabelLines(labels); + var lineSpace = tickFont.size * 0.5; + var tickPadding = me.options.ticks.padding; + + if (isHorizontal) { + // A horizontal axis is more constrained by the height. + me.longestLabelWidth = largestTextWidth; + + var angleRadians = helpers.toRadians(me.labelRotation); + var cosRotation = Math.cos(angleRadians); + var sinRotation = Math.sin(angleRadians); + + // TODO - improve this calculation + var labelHeight = (sinRotation * largestTextWidth) + + (tickFont.size * tallestLabelHeightInLines) + + (lineSpace * (tallestLabelHeightInLines - 1)) + + lineSpace; // padding + + minSize.height = Math.min(me.maxHeight, minSize.height + labelHeight + tickPadding); + + me.ctx.font = tickFont.font; + var firstLabelWidth = computeTextSize(me.ctx, labels[0], tickFont.font); + var lastLabelWidth = computeTextSize(me.ctx, labels[labels.length - 1], tickFont.font); + + // Ensure that our ticks are always inside the canvas. When rotated, ticks are right aligned + // which means that the right padding is dominated by the font height + if (me.labelRotation !== 0) { + me.paddingLeft = opts.position === 'bottom' ? (cosRotation * firstLabelWidth) + 3 : (cosRotation * lineSpace) + 3; // add 3 px to move away from canvas edges + me.paddingRight = opts.position === 'bottom' ? (cosRotation * lineSpace) + 3 : (cosRotation * lastLabelWidth) + 3; + } else { + me.paddingLeft = firstLabelWidth / 2 + 3; // add 3 px to move away from canvas edges + me.paddingRight = lastLabelWidth / 2 + 3; + } + } else { + // A vertical axis is more constrained by the width. Labels are the + // dominant factor here, so get that length first and account for padding + if (tickOpts.mirror) { + largestTextWidth = 0; + } else { + // use lineSpace for consistency with horizontal axis + // tickPadding is not implemented for horizontal + largestTextWidth += tickPadding + lineSpace; + } + + minSize.width = Math.min(me.maxWidth, minSize.width + largestTextWidth); + + me.paddingTop = tickFont.size / 2; + me.paddingBottom = tickFont.size / 2; + } + } + + me.handleMargins(); + + me.width = minSize.width; + me.height = minSize.height; + }, + + /** + * Handle margins and padding interactions + * @private + */ + handleMargins: function() { + var me = this; + if (me.margins) { + me.paddingLeft = Math.max(me.paddingLeft - me.margins.left, 0); + me.paddingTop = Math.max(me.paddingTop - me.margins.top, 0); + me.paddingRight = Math.max(me.paddingRight - me.margins.right, 0); + me.paddingBottom = Math.max(me.paddingBottom - me.margins.bottom, 0); + } + }, + + afterFit: function() { + helpers.callback(this.options.afterFit, [this]); + }, + + // Shared Methods + isHorizontal: function() { + return this.options.position === 'top' || this.options.position === 'bottom'; + }, + isFullWidth: function() { + return (this.options.fullWidth); + }, + + // Get the correct value. NaN bad inputs, If the value type is object get the x or y based on whether we are horizontal or not + getRightValue: function(rawValue) { + // Null and undefined values first + if (helpers.isNullOrUndef(rawValue)) { + return NaN; + } + // isNaN(object) returns true, so make sure NaN is checking for a number; Discard Infinite values + if (typeof rawValue === 'number' && !isFinite(rawValue)) { + return NaN; + } + // If it is in fact an object, dive in one more level + if (rawValue) { + if (this.isHorizontal()) { + if (rawValue.x !== undefined) { + return this.getRightValue(rawValue.x); + } + } else if (rawValue.y !== undefined) { + return this.getRightValue(rawValue.y); + } + } + + // Value is good, return it + return rawValue; + }, + + /** + * Used to get the value to display in the tooltip for the data at the given index + * @param index + * @param datasetIndex + */ + getLabelForIndex: helpers.noop, + + /** + * Returns the location of the given data point. Value can either be an index or a numerical value + * The coordinate (0, 0) is at the upper-left corner of the canvas + * @param value + * @param index + * @param datasetIndex + */ + getPixelForValue: helpers.noop, + + /** + * Used to get the data value from a given pixel. This is the inverse of getPixelForValue + * The coordinate (0, 0) is at the upper-left corner of the canvas + * @param pixel + */ + getValueForPixel: helpers.noop, + + /** + * Returns the location of the tick at the given index + * The coordinate (0, 0) is at the upper-left corner of the canvas + */ + getPixelForTick: function(index) { + var me = this; + var offset = me.options.offset; + if (me.isHorizontal()) { + var innerWidth = me.width - (me.paddingLeft + me.paddingRight); + var tickWidth = innerWidth / Math.max((me._ticks.length - (offset ? 0 : 1)), 1); + var pixel = (tickWidth * index) + me.paddingLeft; + + if (offset) { + pixel += tickWidth / 2; + } + + var finalVal = me.left + Math.round(pixel); + finalVal += me.isFullWidth() ? me.margins.left : 0; + return finalVal; + } + var innerHeight = me.height - (me.paddingTop + me.paddingBottom); + return me.top + (index * (innerHeight / (me._ticks.length - 1))); + }, + + /** + * Utility for getting the pixel location of a percentage of scale + * The coordinate (0, 0) is at the upper-left corner of the canvas + */ + getPixelForDecimal: function(decimal) { + var me = this; + if (me.isHorizontal()) { + var innerWidth = me.width - (me.paddingLeft + me.paddingRight); + var valueOffset = (innerWidth * decimal) + me.paddingLeft; + + var finalVal = me.left + Math.round(valueOffset); + finalVal += me.isFullWidth() ? me.margins.left : 0; + return finalVal; + } + return me.top + (decimal * me.height); + }, + + /** + * Returns the pixel for the minimum chart value + * The coordinate (0, 0) is at the upper-left corner of the canvas + */ + getBasePixel: function() { + return this.getPixelForValue(this.getBaseValue()); + }, + + getBaseValue: function() { + var me = this; + var min = me.min; + var max = me.max; + + return me.beginAtZero ? 0 : + min < 0 && max < 0 ? max : + min > 0 && max > 0 ? min : + 0; + }, + + /** + * Returns a subset of ticks to be plotted to avoid overlapping labels. + * @private + */ + _autoSkip: function(ticks) { + var skipRatio; + var me = this; + var isHorizontal = me.isHorizontal(); + var optionTicks = me.options.ticks.minor; + var tickCount = ticks.length; + var labelRotationRadians = helpers.toRadians(me.labelRotation); + var cosRotation = Math.cos(labelRotationRadians); + var longestRotatedLabel = me.longestLabelWidth * cosRotation; + var result = []; + var i, tick, shouldSkip; + + // figure out the maximum number of gridlines to show + var maxTicks; + if (optionTicks.maxTicksLimit) { + maxTicks = optionTicks.maxTicksLimit; + } + + if (isHorizontal) { + skipRatio = false; + + if ((longestRotatedLabel + optionTicks.autoSkipPadding) * tickCount > (me.width - (me.paddingLeft + me.paddingRight))) { + skipRatio = 1 + Math.floor(((longestRotatedLabel + optionTicks.autoSkipPadding) * tickCount) / (me.width - (me.paddingLeft + me.paddingRight))); + } + + // if they defined a max number of optionTicks, + // increase skipRatio until that number is met + if (maxTicks && tickCount > maxTicks) { + skipRatio = Math.max(skipRatio, Math.floor(tickCount / maxTicks)); + } + } + + for (i = 0; i < tickCount; i++) { + tick = ticks[i]; + + // Since we always show the last tick,we need may need to hide the last shown one before + shouldSkip = (skipRatio > 1 && i % skipRatio > 0) || (i % skipRatio === 0 && i + skipRatio >= tickCount); + if (shouldSkip && i !== tickCount - 1) { + // leave tick in place but make sure it's not displayed (#4635) + delete tick.label; + } + result.push(tick); + } + return result; + }, + + // Actually draw the scale on the canvas + // @param {rectangle} chartArea : the area of the chart to draw full grid lines on + draw: function(chartArea) { + var me = this; + var options = me.options; + if (!options.display) { + return; + } + + var context = me.ctx; + var globalDefaults = defaults.global; + var optionTicks = options.ticks.minor; + var optionMajorTicks = options.ticks.major || optionTicks; + var gridLines = options.gridLines; + var scaleLabel = options.scaleLabel; + + var isRotated = me.labelRotation !== 0; + var isHorizontal = me.isHorizontal(); + + var ticks = optionTicks.autoSkip ? me._autoSkip(me.getTicks()) : me.getTicks(); + var tickFontColor = helpers.valueOrDefault(optionTicks.fontColor, globalDefaults.defaultFontColor); + var tickFont = parseFontOptions(optionTicks); + var majorTickFontColor = helpers.valueOrDefault(optionMajorTicks.fontColor, globalDefaults.defaultFontColor); + var majorTickFont = parseFontOptions(optionMajorTicks); + + var tl = gridLines.drawTicks ? gridLines.tickMarkLength : 0; + + var scaleLabelFontColor = helpers.valueOrDefault(scaleLabel.fontColor, globalDefaults.defaultFontColor); + var scaleLabelFont = parseFontOptions(scaleLabel); + var scaleLabelPadding = helpers.options.toPadding(scaleLabel.padding); + var labelRotationRadians = helpers.toRadians(me.labelRotation); + + var itemsToDraw = []; + + var axisWidth = me.options.gridLines.lineWidth; + var xTickStart = options.position === 'right' ? me.left : me.right - axisWidth - tl; + var xTickEnd = options.position === 'right' ? me.left + tl : me.right; + var yTickStart = options.position === 'bottom' ? me.top + axisWidth : me.bottom - tl - axisWidth; + var yTickEnd = options.position === 'bottom' ? me.top + axisWidth + tl : me.bottom + axisWidth; + + helpers.each(ticks, function(tick, index) { + // autoskipper skipped this tick (#4635) + if (helpers.isNullOrUndef(tick.label)) { + return; + } + + var label = tick.label; + var lineWidth, lineColor, borderDash, borderDashOffset; + if (index === me.zeroLineIndex && options.offset === gridLines.offsetGridLines) { + // Draw the first index specially + lineWidth = gridLines.zeroLineWidth; + lineColor = gridLines.zeroLineColor; + borderDash = gridLines.zeroLineBorderDash; + borderDashOffset = gridLines.zeroLineBorderDashOffset; + } else { + lineWidth = helpers.valueAtIndexOrDefault(gridLines.lineWidth, index); + lineColor = helpers.valueAtIndexOrDefault(gridLines.color, index); + borderDash = helpers.valueOrDefault(gridLines.borderDash, globalDefaults.borderDash); + borderDashOffset = helpers.valueOrDefault(gridLines.borderDashOffset, globalDefaults.borderDashOffset); + } + + // Common properties + var tx1, ty1, tx2, ty2, x1, y1, x2, y2, labelX, labelY; + var textAlign = 'middle'; + var textBaseline = 'middle'; + var tickPadding = optionTicks.padding; + + if (isHorizontal) { + var labelYOffset = tl + tickPadding; + + if (options.position === 'bottom') { + // bottom + textBaseline = !isRotated ? 'top' : 'middle'; + textAlign = !isRotated ? 'center' : 'right'; + labelY = me.top + labelYOffset; + } else { + // top + textBaseline = !isRotated ? 'bottom' : 'middle'; + textAlign = !isRotated ? 'center' : 'left'; + labelY = me.bottom - labelYOffset; + } + + var xLineValue = getLineValue(me, index, gridLines.offsetGridLines && ticks.length > 1); + if (xLineValue < me.left) { + lineColor = 'rgba(0,0,0,0)'; + } + xLineValue += helpers.aliasPixel(lineWidth); + + labelX = me.getPixelForTick(index) + optionTicks.labelOffset; // x values for optionTicks (need to consider offsetLabel option) + + tx1 = tx2 = x1 = x2 = xLineValue; + ty1 = yTickStart; + ty2 = yTickEnd; + y1 = chartArea.top; + y2 = chartArea.bottom + axisWidth; + } else { + var isLeft = options.position === 'left'; + var labelXOffset; + + if (optionTicks.mirror) { + textAlign = isLeft ? 'left' : 'right'; + labelXOffset = tickPadding; + } else { + textAlign = isLeft ? 'right' : 'left'; + labelXOffset = tl + tickPadding; + } + + labelX = isLeft ? me.right - labelXOffset : me.left + labelXOffset; + + var yLineValue = getLineValue(me, index, gridLines.offsetGridLines && ticks.length > 1); + if (yLineValue < me.top) { + lineColor = 'rgba(0,0,0,0)'; + } + yLineValue += helpers.aliasPixel(lineWidth); + + labelY = me.getPixelForTick(index) + optionTicks.labelOffset; + + tx1 = xTickStart; + tx2 = xTickEnd; + x1 = chartArea.left; + x2 = chartArea.right + axisWidth; + ty1 = ty2 = y1 = y2 = yLineValue; + } + + itemsToDraw.push({ + tx1: tx1, + ty1: ty1, + tx2: tx2, + ty2: ty2, + x1: x1, + y1: y1, + x2: x2, + y2: y2, + labelX: labelX, + labelY: labelY, + glWidth: lineWidth, + glColor: lineColor, + glBorderDash: borderDash, + glBorderDashOffset: borderDashOffset, + rotation: -1 * labelRotationRadians, + label: label, + major: tick.major, + textBaseline: textBaseline, + textAlign: textAlign + }); + }); + + // Draw all of the tick labels, tick marks, and grid lines at the correct places + helpers.each(itemsToDraw, function(itemToDraw) { + if (gridLines.display) { + context.save(); + context.lineWidth = itemToDraw.glWidth; + context.strokeStyle = itemToDraw.glColor; + if (context.setLineDash) { + context.setLineDash(itemToDraw.glBorderDash); + context.lineDashOffset = itemToDraw.glBorderDashOffset; + } + + context.beginPath(); + + if (gridLines.drawTicks) { + context.moveTo(itemToDraw.tx1, itemToDraw.ty1); + context.lineTo(itemToDraw.tx2, itemToDraw.ty2); + } + + if (gridLines.drawOnChartArea) { + context.moveTo(itemToDraw.x1, itemToDraw.y1); + context.lineTo(itemToDraw.x2, itemToDraw.y2); + } + + context.stroke(); + context.restore(); + } + + if (optionTicks.display) { + // Make sure we draw text in the correct color and font + context.save(); + context.translate(itemToDraw.labelX, itemToDraw.labelY); + context.rotate(itemToDraw.rotation); + context.font = itemToDraw.major ? majorTickFont.font : tickFont.font; + context.fillStyle = itemToDraw.major ? majorTickFontColor : tickFontColor; + context.textBaseline = itemToDraw.textBaseline; + context.textAlign = itemToDraw.textAlign; + + var label = itemToDraw.label; + if (helpers.isArray(label)) { + var lineCount = label.length; + var lineHeight = tickFont.size * 1.5; + var y = me.isHorizontal() ? 0 : -lineHeight * (lineCount - 1) / 2; + + for (var i = 0; i < lineCount; ++i) { + // We just make sure the multiline element is a string here.. + context.fillText('' + label[i], 0, y); + // apply same lineSpacing as calculated @ L#320 + y += lineHeight; + } + } else { + context.fillText(label, 0, 0); + } + context.restore(); + } + }); + + if (scaleLabel.display) { + // Draw the scale label + var scaleLabelX; + var scaleLabelY; + var rotation = 0; + var halfLineHeight = parseLineHeight(scaleLabel) / 2; + + if (isHorizontal) { + scaleLabelX = me.left + ((me.right - me.left) / 2); // midpoint of the width + scaleLabelY = options.position === 'bottom' + ? me.bottom - halfLineHeight - scaleLabelPadding.bottom + : me.top + halfLineHeight + scaleLabelPadding.top; + } else { + var isLeft = options.position === 'left'; + scaleLabelX = isLeft + ? me.left + halfLineHeight + scaleLabelPadding.top + : me.right - halfLineHeight - scaleLabelPadding.top; + scaleLabelY = me.top + ((me.bottom - me.top) / 2); + rotation = isLeft ? -0.5 * Math.PI : 0.5 * Math.PI; + } + + context.save(); + context.translate(scaleLabelX, scaleLabelY); + context.rotate(rotation); + context.textAlign = 'center'; + context.textBaseline = 'middle'; + context.fillStyle = scaleLabelFontColor; // render in correct colour + context.font = scaleLabelFont.font; + context.fillText(scaleLabel.labelString, 0, 0); + context.restore(); + } + + if (gridLines.drawBorder) { + // Draw the line at the edge of the axis + context.lineWidth = helpers.valueAtIndexOrDefault(gridLines.lineWidth, 0); + context.strokeStyle = helpers.valueAtIndexOrDefault(gridLines.color, 0); + var x1 = me.left; + var x2 = me.right + axisWidth; + var y1 = me.top; + var y2 = me.bottom + axisWidth; + + var aliasPixel = helpers.aliasPixel(context.lineWidth); + if (isHorizontal) { + y1 = y2 = options.position === 'top' ? me.bottom : me.top; + y1 += aliasPixel; + y2 += aliasPixel; + } else { + x1 = x2 = options.position === 'left' ? me.right : me.left; + x1 += aliasPixel; + x2 += aliasPixel; + } + + context.beginPath(); + context.moveTo(x1, y1); + context.lineTo(x2, y2); + context.stroke(); + } + } +}); + +},{"26":26,"27":27,"35":35,"46":46}],34:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var helpers = require(46); +var layouts = require(31); + +module.exports = { + // Scale registration object. Extensions can register new scale types (such as log or DB scales) and then + // use the new chart options to grab the correct scale + constructors: {}, + // Use a registration function so that we can move to an ES6 map when we no longer need to support + // old browsers + + // Scale config defaults + defaults: {}, + registerScaleType: function(type, scaleConstructor, scaleDefaults) { + this.constructors[type] = scaleConstructor; + this.defaults[type] = helpers.clone(scaleDefaults); + }, + getScaleConstructor: function(type) { + return this.constructors.hasOwnProperty(type) ? this.constructors[type] : undefined; + }, + getScaleDefaults: function(type) { + // Return the scale defaults merged with the global settings so that we always use the latest ones + return this.defaults.hasOwnProperty(type) ? helpers.merge({}, [defaults.scale, this.defaults[type]]) : {}; + }, + updateScaleDefaults: function(type, additions) { + var me = this; + if (me.defaults.hasOwnProperty(type)) { + me.defaults[type] = helpers.extend(me.defaults[type], additions); + } + }, + addScalesToLayout: function(chart) { + // Adds each scale to the chart.boxes array to be sized accordingly + helpers.each(chart.scales, function(scale) { + // Set ILayoutItem parameters for backwards compatibility + scale.fullWidth = scale.options.fullWidth; + scale.position = scale.options.position; + scale.weight = scale.options.weight; + layouts.addBox(chart, scale); + }); + } +}; + +},{"26":26,"31":31,"46":46}],35:[function(require,module,exports){ +'use strict'; + +var helpers = require(46); + +/** + * Namespace to hold static tick generation functions + * @namespace Chart.Ticks + */ +module.exports = { + /** + * Namespace to hold formatters for different types of ticks + * @namespace Chart.Ticks.formatters + */ + formatters: { + /** + * Formatter for value labels + * @method Chart.Ticks.formatters.values + * @param value the value to display + * @return {String|Array} the label to display + */ + values: function(value) { + return helpers.isArray(value) ? value : '' + value; + }, + + /** + * Formatter for linear numeric ticks + * @method Chart.Ticks.formatters.linear + * @param tickValue {Number} the value to be formatted + * @param index {Number} the position of the tickValue parameter in the ticks array + * @param ticks {Array} the list of ticks being converted + * @return {String} string representation of the tickValue parameter + */ + linear: function(tickValue, index, ticks) { + // If we have lots of ticks, don't use the ones + var delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0]; + + // If we have a number like 2.5 as the delta, figure out how many decimal places we need + if (Math.abs(delta) > 1) { + if (tickValue !== Math.floor(tickValue)) { + // not an integer + delta = tickValue - Math.floor(tickValue); + } + } + + var logDelta = helpers.log10(Math.abs(delta)); + var tickString = ''; + + if (tickValue !== 0) { + var maxTick = Math.max(Math.abs(ticks[0]), Math.abs(ticks[ticks.length - 1])); + if (maxTick < 1e-4) { // all ticks are small numbers; use scientific notation + var logTick = helpers.log10(Math.abs(tickValue)); + tickString = tickValue.toExponential(Math.floor(logTick) - Math.floor(logDelta)); + } else { + var numDecimal = -1 * Math.floor(logDelta); + numDecimal = Math.max(Math.min(numDecimal, 20), 0); // toFixed has a max of 20 decimal places + tickString = tickValue.toFixed(numDecimal); + } + } else { + tickString = '0'; // never show decimal places for 0 + } + + return tickString; + }, + + logarithmic: function(tickValue, index, ticks) { + var remain = tickValue / (Math.pow(10, Math.floor(helpers.log10(tickValue)))); + + if (tickValue === 0) { + return '0'; + } else if (remain === 1 || remain === 2 || remain === 5 || index === 0 || index === ticks.length - 1) { + return tickValue.toExponential(); + } + return ''; + } + } +}; + +},{"46":46}],36:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var Element = require(27); +var helpers = require(46); + +defaults._set('global', { + tooltips: { + enabled: true, + custom: null, + mode: 'nearest', + position: 'average', + intersect: true, + backgroundColor: 'rgba(0,0,0,0.8)', + titleFontStyle: 'bold', + titleSpacing: 2, + titleMarginBottom: 6, + titleFontColor: '#fff', + titleAlign: 'left', + bodySpacing: 2, + bodyFontColor: '#fff', + bodyAlign: 'left', + footerFontStyle: 'bold', + footerSpacing: 2, + footerMarginTop: 6, + footerFontColor: '#fff', + footerAlign: 'left', + yPadding: 6, + xPadding: 6, + caretPadding: 2, + caretSize: 5, + cornerRadius: 6, + multiKeyBackground: '#fff', + displayColors: true, + borderColor: 'rgba(0,0,0,0)', + borderWidth: 0, + callbacks: { + // Args are: (tooltipItems, data) + beforeTitle: helpers.noop, + title: function(tooltipItems, data) { + // Pick first xLabel for now + var title = ''; + var labels = data.labels; + var labelCount = labels ? labels.length : 0; + + if (tooltipItems.length > 0) { + var item = tooltipItems[0]; + + if (item.xLabel) { + title = item.xLabel; + } else if (labelCount > 0 && item.index < labelCount) { + title = labels[item.index]; + } + } + + return title; + }, + afterTitle: helpers.noop, + + // Args are: (tooltipItems, data) + beforeBody: helpers.noop, + + // Args are: (tooltipItem, data) + beforeLabel: helpers.noop, + label: function(tooltipItem, data) { + var label = data.datasets[tooltipItem.datasetIndex].label || ''; + + if (label) { + label += ': '; + } + label += tooltipItem.yLabel; + return label; + }, + labelColor: function(tooltipItem, chart) { + var meta = chart.getDatasetMeta(tooltipItem.datasetIndex); + var activeElement = meta.data[tooltipItem.index]; + var view = activeElement._view; + return { + borderColor: view.borderColor, + backgroundColor: view.backgroundColor + }; + }, + labelTextColor: function() { + return this._options.bodyFontColor; + }, + afterLabel: helpers.noop, + + // Args are: (tooltipItems, data) + afterBody: helpers.noop, + + // Args are: (tooltipItems, data) + beforeFooter: helpers.noop, + footer: helpers.noop, + afterFooter: helpers.noop + } + } +}); + +var positioners = { + /** + * Average mode places the tooltip at the average position of the elements shown + * @function Chart.Tooltip.positioners.average + * @param elements {ChartElement[]} the elements being displayed in the tooltip + * @returns {Point} tooltip position + */ + average: function(elements) { + if (!elements.length) { + return false; + } + + var i, len; + var x = 0; + var y = 0; + var count = 0; + + for (i = 0, len = elements.length; i < len; ++i) { + var el = elements[i]; + if (el && el.hasValue()) { + var pos = el.tooltipPosition(); + x += pos.x; + y += pos.y; + ++count; + } + } + + return { + x: Math.round(x / count), + y: Math.round(y / count) + }; + }, + + /** + * Gets the tooltip position nearest of the item nearest to the event position + * @function Chart.Tooltip.positioners.nearest + * @param elements {Chart.Element[]} the tooltip elements + * @param eventPosition {Point} the position of the event in canvas coordinates + * @returns {Point} the tooltip position + */ + nearest: function(elements, eventPosition) { + var x = eventPosition.x; + var y = eventPosition.y; + var minDistance = Number.POSITIVE_INFINITY; + var i, len, nearestElement; + + for (i = 0, len = elements.length; i < len; ++i) { + var el = elements[i]; + if (el && el.hasValue()) { + var center = el.getCenterPoint(); + var d = helpers.distanceBetweenPoints(eventPosition, center); + + if (d < minDistance) { + minDistance = d; + nearestElement = el; + } + } + } + + if (nearestElement) { + var tp = nearestElement.tooltipPosition(); + x = tp.x; + y = tp.y; + } + + return { + x: x, + y: y + }; + } +}; + +/** + * Helper method to merge the opacity into a color + */ +function mergeOpacity(colorString, opacity) { + var color = helpers.color(colorString); + return color.alpha(opacity * color.alpha()).rgbaString(); +} + +// Helper to push or concat based on if the 2nd parameter is an array or not +function pushOrConcat(base, toPush) { + if (toPush) { + if (helpers.isArray(toPush)) { + // base = base.concat(toPush); + Array.prototype.push.apply(base, toPush); + } else { + base.push(toPush); + } + } + + return base; +} + +/** + * Returns array of strings split by newline + * @param {String} value - The value to split by newline. + * @returns {Array} value if newline present - Returned from String split() method + * @function + */ +function splitNewlines(str) { + if ((typeof str === 'string' || str instanceof String) && str.indexOf('\n') > -1) { + return str.split('\n'); + } + return str; +} + + +// Private helper to create a tooltip item model +// @param element : the chart element (point, arc, bar) to create the tooltip item for +// @return : new tooltip item +function createTooltipItem(element) { + var xScale = element._xScale; + var yScale = element._yScale || element._scale; // handle radar || polarArea charts + var index = element._index; + var datasetIndex = element._datasetIndex; + + return { + xLabel: xScale ? xScale.getLabelForIndex(index, datasetIndex) : '', + yLabel: yScale ? yScale.getLabelForIndex(index, datasetIndex) : '', + index: index, + datasetIndex: datasetIndex, + x: element._model.x, + y: element._model.y + }; +} + +/** + * Helper to get the reset model for the tooltip + * @param tooltipOpts {Object} the tooltip options + */ +function getBaseModel(tooltipOpts) { + var globalDefaults = defaults.global; + var valueOrDefault = helpers.valueOrDefault; + + return { + // Positioning + xPadding: tooltipOpts.xPadding, + yPadding: tooltipOpts.yPadding, + xAlign: tooltipOpts.xAlign, + yAlign: tooltipOpts.yAlign, + + // Body + bodyFontColor: tooltipOpts.bodyFontColor, + _bodyFontFamily: valueOrDefault(tooltipOpts.bodyFontFamily, globalDefaults.defaultFontFamily), + _bodyFontStyle: valueOrDefault(tooltipOpts.bodyFontStyle, globalDefaults.defaultFontStyle), + _bodyAlign: tooltipOpts.bodyAlign, + bodyFontSize: valueOrDefault(tooltipOpts.bodyFontSize, globalDefaults.defaultFontSize), + bodySpacing: tooltipOpts.bodySpacing, + + // Title + titleFontColor: tooltipOpts.titleFontColor, + _titleFontFamily: valueOrDefault(tooltipOpts.titleFontFamily, globalDefaults.defaultFontFamily), + _titleFontStyle: valueOrDefault(tooltipOpts.titleFontStyle, globalDefaults.defaultFontStyle), + titleFontSize: valueOrDefault(tooltipOpts.titleFontSize, globalDefaults.defaultFontSize), + _titleAlign: tooltipOpts.titleAlign, + titleSpacing: tooltipOpts.titleSpacing, + titleMarginBottom: tooltipOpts.titleMarginBottom, + + // Footer + footerFontColor: tooltipOpts.footerFontColor, + _footerFontFamily: valueOrDefault(tooltipOpts.footerFontFamily, globalDefaults.defaultFontFamily), + _footerFontStyle: valueOrDefault(tooltipOpts.footerFontStyle, globalDefaults.defaultFontStyle), + footerFontSize: valueOrDefault(tooltipOpts.footerFontSize, globalDefaults.defaultFontSize), + _footerAlign: tooltipOpts.footerAlign, + footerSpacing: tooltipOpts.footerSpacing, + footerMarginTop: tooltipOpts.footerMarginTop, + + // Appearance + caretSize: tooltipOpts.caretSize, + cornerRadius: tooltipOpts.cornerRadius, + backgroundColor: tooltipOpts.backgroundColor, + opacity: 0, + legendColorBackground: tooltipOpts.multiKeyBackground, + displayColors: tooltipOpts.displayColors, + borderColor: tooltipOpts.borderColor, + borderWidth: tooltipOpts.borderWidth + }; +} + +/** + * Get the size of the tooltip + */ +function getTooltipSize(tooltip, model) { + var ctx = tooltip._chart.ctx; + + var height = model.yPadding * 2; // Tooltip Padding + var width = 0; + + // Count of all lines in the body + var body = model.body; + var combinedBodyLength = body.reduce(function(count, bodyItem) { + return count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length; + }, 0); + combinedBodyLength += model.beforeBody.length + model.afterBody.length; + + var titleLineCount = model.title.length; + var footerLineCount = model.footer.length; + var titleFontSize = model.titleFontSize; + var bodyFontSize = model.bodyFontSize; + var footerFontSize = model.footerFontSize; + + height += titleLineCount * titleFontSize; // Title Lines + height += titleLineCount ? (titleLineCount - 1) * model.titleSpacing : 0; // Title Line Spacing + height += titleLineCount ? model.titleMarginBottom : 0; // Title's bottom Margin + height += combinedBodyLength * bodyFontSize; // Body Lines + height += combinedBodyLength ? (combinedBodyLength - 1) * model.bodySpacing : 0; // Body Line Spacing + height += footerLineCount ? model.footerMarginTop : 0; // Footer Margin + height += footerLineCount * (footerFontSize); // Footer Lines + height += footerLineCount ? (footerLineCount - 1) * model.footerSpacing : 0; // Footer Line Spacing + + // Title width + var widthPadding = 0; + var maxLineWidth = function(line) { + width = Math.max(width, ctx.measureText(line).width + widthPadding); + }; + + ctx.font = helpers.fontString(titleFontSize, model._titleFontStyle, model._titleFontFamily); + helpers.each(model.title, maxLineWidth); + + // Body width + ctx.font = helpers.fontString(bodyFontSize, model._bodyFontStyle, model._bodyFontFamily); + helpers.each(model.beforeBody.concat(model.afterBody), maxLineWidth); + + // Body lines may include some extra width due to the color box + widthPadding = model.displayColors ? (bodyFontSize + 2) : 0; + helpers.each(body, function(bodyItem) { + helpers.each(bodyItem.before, maxLineWidth); + helpers.each(bodyItem.lines, maxLineWidth); + helpers.each(bodyItem.after, maxLineWidth); + }); + + // Reset back to 0 + widthPadding = 0; + + // Footer width + ctx.font = helpers.fontString(footerFontSize, model._footerFontStyle, model._footerFontFamily); + helpers.each(model.footer, maxLineWidth); + + // Add padding + width += 2 * model.xPadding; + + return { + width: width, + height: height + }; +} + +/** + * Helper to get the alignment of a tooltip given the size + */ +function determineAlignment(tooltip, size) { + var model = tooltip._model; + var chart = tooltip._chart; + var chartArea = tooltip._chart.chartArea; + var xAlign = 'center'; + var yAlign = 'center'; + + if (model.y < size.height) { + yAlign = 'top'; + } else if (model.y > (chart.height - size.height)) { + yAlign = 'bottom'; + } + + var lf, rf; // functions to determine left, right alignment + var olf, orf; // functions to determine if left/right alignment causes tooltip to go outside chart + var yf; // function to get the y alignment if the tooltip goes outside of the left or right edges + var midX = (chartArea.left + chartArea.right) / 2; + var midY = (chartArea.top + chartArea.bottom) / 2; + + if (yAlign === 'center') { + lf = function(x) { + return x <= midX; + }; + rf = function(x) { + return x > midX; + }; + } else { + lf = function(x) { + return x <= (size.width / 2); + }; + rf = function(x) { + return x >= (chart.width - (size.width / 2)); + }; + } + + olf = function(x) { + return x + size.width + model.caretSize + model.caretPadding > chart.width; + }; + orf = function(x) { + return x - size.width - model.caretSize - model.caretPadding < 0; + }; + yf = function(y) { + return y <= midY ? 'top' : 'bottom'; + }; + + if (lf(model.x)) { + xAlign = 'left'; + + // Is tooltip too wide and goes over the right side of the chart.? + if (olf(model.x)) { + xAlign = 'center'; + yAlign = yf(model.y); + } + } else if (rf(model.x)) { + xAlign = 'right'; + + // Is tooltip too wide and goes outside left edge of canvas? + if (orf(model.x)) { + xAlign = 'center'; + yAlign = yf(model.y); + } + } + + var opts = tooltip._options; + return { + xAlign: opts.xAlign ? opts.xAlign : xAlign, + yAlign: opts.yAlign ? opts.yAlign : yAlign + }; +} + +/** + * Helper to get the location a tooltip needs to be placed at given the initial position (via the vm) and the size and alignment + */ +function getBackgroundPoint(vm, size, alignment, chart) { + // Background Position + var x = vm.x; + var y = vm.y; + + var caretSize = vm.caretSize; + var caretPadding = vm.caretPadding; + var cornerRadius = vm.cornerRadius; + var xAlign = alignment.xAlign; + var yAlign = alignment.yAlign; + var paddingAndSize = caretSize + caretPadding; + var radiusAndPadding = cornerRadius + caretPadding; + + if (xAlign === 'right') { + x -= size.width; + } else if (xAlign === 'center') { + x -= (size.width / 2); + if (x + size.width > chart.width) { + x = chart.width - size.width; + } + if (x < 0) { + x = 0; + } + } + + if (yAlign === 'top') { + y += paddingAndSize; + } else if (yAlign === 'bottom') { + y -= size.height + paddingAndSize; + } else { + y -= (size.height / 2); + } + + if (yAlign === 'center') { + if (xAlign === 'left') { + x += paddingAndSize; + } else if (xAlign === 'right') { + x -= paddingAndSize; + } + } else if (xAlign === 'left') { + x -= radiusAndPadding; + } else if (xAlign === 'right') { + x += radiusAndPadding; + } + + return { + x: x, + y: y + }; +} + +/** + * Helper to build before and after body lines + */ +function getBeforeAfterBodyLines(callback) { + return pushOrConcat([], splitNewlines(callback)); +} + +var exports = module.exports = Element.extend({ + initialize: function() { + this._model = getBaseModel(this._options); + this._lastActive = []; + }, + + // Get the title + // Args are: (tooltipItem, data) + getTitle: function() { + var me = this; + var opts = me._options; + var callbacks = opts.callbacks; + + var beforeTitle = callbacks.beforeTitle.apply(me, arguments); + var title = callbacks.title.apply(me, arguments); + var afterTitle = callbacks.afterTitle.apply(me, arguments); + + var lines = []; + lines = pushOrConcat(lines, splitNewlines(beforeTitle)); + lines = pushOrConcat(lines, splitNewlines(title)); + lines = pushOrConcat(lines, splitNewlines(afterTitle)); + + return lines; + }, + + // Args are: (tooltipItem, data) + getBeforeBody: function() { + return getBeforeAfterBodyLines(this._options.callbacks.beforeBody.apply(this, arguments)); + }, + + // Args are: (tooltipItem, data) + getBody: function(tooltipItems, data) { + var me = this; + var callbacks = me._options.callbacks; + var bodyItems = []; + + helpers.each(tooltipItems, function(tooltipItem) { + var bodyItem = { + before: [], + lines: [], + after: [] + }; + pushOrConcat(bodyItem.before, splitNewlines(callbacks.beforeLabel.call(me, tooltipItem, data))); + pushOrConcat(bodyItem.lines, callbacks.label.call(me, tooltipItem, data)); + pushOrConcat(bodyItem.after, splitNewlines(callbacks.afterLabel.call(me, tooltipItem, data))); + + bodyItems.push(bodyItem); + }); + + return bodyItems; + }, + + // Args are: (tooltipItem, data) + getAfterBody: function() { + return getBeforeAfterBodyLines(this._options.callbacks.afterBody.apply(this, arguments)); + }, + + // Get the footer and beforeFooter and afterFooter lines + // Args are: (tooltipItem, data) + getFooter: function() { + var me = this; + var callbacks = me._options.callbacks; + + var beforeFooter = callbacks.beforeFooter.apply(me, arguments); + var footer = callbacks.footer.apply(me, arguments); + var afterFooter = callbacks.afterFooter.apply(me, arguments); + + var lines = []; + lines = pushOrConcat(lines, splitNewlines(beforeFooter)); + lines = pushOrConcat(lines, splitNewlines(footer)); + lines = pushOrConcat(lines, splitNewlines(afterFooter)); + + return lines; + }, + + update: function(changed) { + var me = this; + var opts = me._options; + + // Need to regenerate the model because its faster than using extend and it is necessary due to the optimization in Chart.Element.transition + // that does _view = _model if ease === 1. This causes the 2nd tooltip update to set properties in both the view and model at the same time + // which breaks any animations. + var existingModel = me._model; + var model = me._model = getBaseModel(opts); + var active = me._active; + + var data = me._data; + + // In the case where active.length === 0 we need to keep these at existing values for good animations + var alignment = { + xAlign: existingModel.xAlign, + yAlign: existingModel.yAlign + }; + var backgroundPoint = { + x: existingModel.x, + y: existingModel.y + }; + var tooltipSize = { + width: existingModel.width, + height: existingModel.height + }; + var tooltipPosition = { + x: existingModel.caretX, + y: existingModel.caretY + }; + + var i, len; + + if (active.length) { + model.opacity = 1; + + var labelColors = []; + var labelTextColors = []; + tooltipPosition = positioners[opts.position].call(me, active, me._eventPosition); + + var tooltipItems = []; + for (i = 0, len = active.length; i < len; ++i) { + tooltipItems.push(createTooltipItem(active[i])); + } + + // If the user provided a filter function, use it to modify the tooltip items + if (opts.filter) { + tooltipItems = tooltipItems.filter(function(a) { + return opts.filter(a, data); + }); + } + + // If the user provided a sorting function, use it to modify the tooltip items + if (opts.itemSort) { + tooltipItems = tooltipItems.sort(function(a, b) { + return opts.itemSort(a, b, data); + }); + } + + // Determine colors for boxes + helpers.each(tooltipItems, function(tooltipItem) { + labelColors.push(opts.callbacks.labelColor.call(me, tooltipItem, me._chart)); + labelTextColors.push(opts.callbacks.labelTextColor.call(me, tooltipItem, me._chart)); + }); + + + // Build the Text Lines + model.title = me.getTitle(tooltipItems, data); + model.beforeBody = me.getBeforeBody(tooltipItems, data); + model.body = me.getBody(tooltipItems, data); + model.afterBody = me.getAfterBody(tooltipItems, data); + model.footer = me.getFooter(tooltipItems, data); + + // Initial positioning and colors + model.x = Math.round(tooltipPosition.x); + model.y = Math.round(tooltipPosition.y); + model.caretPadding = opts.caretPadding; + model.labelColors = labelColors; + model.labelTextColors = labelTextColors; + + // data points + model.dataPoints = tooltipItems; + + // We need to determine alignment of the tooltip + tooltipSize = getTooltipSize(this, model); + alignment = determineAlignment(this, tooltipSize); + // Final Size and Position + backgroundPoint = getBackgroundPoint(model, tooltipSize, alignment, me._chart); + } else { + model.opacity = 0; + } + + model.xAlign = alignment.xAlign; + model.yAlign = alignment.yAlign; + model.x = backgroundPoint.x; + model.y = backgroundPoint.y; + model.width = tooltipSize.width; + model.height = tooltipSize.height; + + // Point where the caret on the tooltip points to + model.caretX = tooltipPosition.x; + model.caretY = tooltipPosition.y; + + me._model = model; + + if (changed && opts.custom) { + opts.custom.call(me, model); + } + + return me; + }, + + drawCaret: function(tooltipPoint, size) { + var ctx = this._chart.ctx; + var vm = this._view; + var caretPosition = this.getCaretPosition(tooltipPoint, size, vm); + + ctx.lineTo(caretPosition.x1, caretPosition.y1); + ctx.lineTo(caretPosition.x2, caretPosition.y2); + ctx.lineTo(caretPosition.x3, caretPosition.y3); + }, + getCaretPosition: function(tooltipPoint, size, vm) { + var x1, x2, x3, y1, y2, y3; + var caretSize = vm.caretSize; + var cornerRadius = vm.cornerRadius; + var xAlign = vm.xAlign; + var yAlign = vm.yAlign; + var ptX = tooltipPoint.x; + var ptY = tooltipPoint.y; + var width = size.width; + var height = size.height; + + if (yAlign === 'center') { + y2 = ptY + (height / 2); + + if (xAlign === 'left') { + x1 = ptX; + x2 = x1 - caretSize; + x3 = x1; + + y1 = y2 + caretSize; + y3 = y2 - caretSize; + } else { + x1 = ptX + width; + x2 = x1 + caretSize; + x3 = x1; + + y1 = y2 - caretSize; + y3 = y2 + caretSize; + } + } else { + if (xAlign === 'left') { + x2 = ptX + cornerRadius + (caretSize); + x1 = x2 - caretSize; + x3 = x2 + caretSize; + } else if (xAlign === 'right') { + x2 = ptX + width - cornerRadius - caretSize; + x1 = x2 - caretSize; + x3 = x2 + caretSize; + } else { + x2 = vm.caretX; + x1 = x2 - caretSize; + x3 = x2 + caretSize; + } + if (yAlign === 'top') { + y1 = ptY; + y2 = y1 - caretSize; + y3 = y1; + } else { + y1 = ptY + height; + y2 = y1 + caretSize; + y3 = y1; + // invert drawing order + var tmp = x3; + x3 = x1; + x1 = tmp; + } + } + return {x1: x1, x2: x2, x3: x3, y1: y1, y2: y2, y3: y3}; + }, + + drawTitle: function(pt, vm, ctx, opacity) { + var title = vm.title; + + if (title.length) { + ctx.textAlign = vm._titleAlign; + ctx.textBaseline = 'top'; + + var titleFontSize = vm.titleFontSize; + var titleSpacing = vm.titleSpacing; + + ctx.fillStyle = mergeOpacity(vm.titleFontColor, opacity); + ctx.font = helpers.fontString(titleFontSize, vm._titleFontStyle, vm._titleFontFamily); + + var i, len; + for (i = 0, len = title.length; i < len; ++i) { + ctx.fillText(title[i], pt.x, pt.y); + pt.y += titleFontSize + titleSpacing; // Line Height and spacing + + if (i + 1 === title.length) { + pt.y += vm.titleMarginBottom - titleSpacing; // If Last, add margin, remove spacing + } + } + } + }, + + drawBody: function(pt, vm, ctx, opacity) { + var bodyFontSize = vm.bodyFontSize; + var bodySpacing = vm.bodySpacing; + var body = vm.body; + + ctx.textAlign = vm._bodyAlign; + ctx.textBaseline = 'top'; + ctx.font = helpers.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily); + + // Before Body + var xLinePadding = 0; + var fillLineOfText = function(line) { + ctx.fillText(line, pt.x + xLinePadding, pt.y); + pt.y += bodyFontSize + bodySpacing; + }; + + // Before body lines + ctx.fillStyle = mergeOpacity(vm.bodyFontColor, opacity); + helpers.each(vm.beforeBody, fillLineOfText); + + var drawColorBoxes = vm.displayColors; + xLinePadding = drawColorBoxes ? (bodyFontSize + 2) : 0; + + // Draw body lines now + helpers.each(body, function(bodyItem, i) { + var textColor = mergeOpacity(vm.labelTextColors[i], opacity); + ctx.fillStyle = textColor; + helpers.each(bodyItem.before, fillLineOfText); + + helpers.each(bodyItem.lines, function(line) { + // Draw Legend-like boxes if needed + if (drawColorBoxes) { + // Fill a white rect so that colours merge nicely if the opacity is < 1 + ctx.fillStyle = mergeOpacity(vm.legendColorBackground, opacity); + ctx.fillRect(pt.x, pt.y, bodyFontSize, bodyFontSize); + + // Border + ctx.lineWidth = 1; + ctx.strokeStyle = mergeOpacity(vm.labelColors[i].borderColor, opacity); + ctx.strokeRect(pt.x, pt.y, bodyFontSize, bodyFontSize); + + // Inner square + ctx.fillStyle = mergeOpacity(vm.labelColors[i].backgroundColor, opacity); + ctx.fillRect(pt.x + 1, pt.y + 1, bodyFontSize - 2, bodyFontSize - 2); + ctx.fillStyle = textColor; + } + + fillLineOfText(line); + }); + + helpers.each(bodyItem.after, fillLineOfText); + }); + + // Reset back to 0 for after body + xLinePadding = 0; + + // After body lines + helpers.each(vm.afterBody, fillLineOfText); + pt.y -= bodySpacing; // Remove last body spacing + }, + + drawFooter: function(pt, vm, ctx, opacity) { + var footer = vm.footer; + + if (footer.length) { + pt.y += vm.footerMarginTop; + + ctx.textAlign = vm._footerAlign; + ctx.textBaseline = 'top'; + + ctx.fillStyle = mergeOpacity(vm.footerFontColor, opacity); + ctx.font = helpers.fontString(vm.footerFontSize, vm._footerFontStyle, vm._footerFontFamily); + + helpers.each(footer, function(line) { + ctx.fillText(line, pt.x, pt.y); + pt.y += vm.footerFontSize + vm.footerSpacing; + }); + } + }, + + drawBackground: function(pt, vm, ctx, tooltipSize, opacity) { + ctx.fillStyle = mergeOpacity(vm.backgroundColor, opacity); + ctx.strokeStyle = mergeOpacity(vm.borderColor, opacity); + ctx.lineWidth = vm.borderWidth; + var xAlign = vm.xAlign; + var yAlign = vm.yAlign; + var x = pt.x; + var y = pt.y; + var width = tooltipSize.width; + var height = tooltipSize.height; + var radius = vm.cornerRadius; + + ctx.beginPath(); + ctx.moveTo(x + radius, y); + if (yAlign === 'top') { + this.drawCaret(pt, tooltipSize); + } + ctx.lineTo(x + width - radius, y); + ctx.quadraticCurveTo(x + width, y, x + width, y + radius); + if (yAlign === 'center' && xAlign === 'right') { + this.drawCaret(pt, tooltipSize); + } + ctx.lineTo(x + width, y + height - radius); + ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height); + if (yAlign === 'bottom') { + this.drawCaret(pt, tooltipSize); + } + ctx.lineTo(x + radius, y + height); + ctx.quadraticCurveTo(x, y + height, x, y + height - radius); + if (yAlign === 'center' && xAlign === 'left') { + this.drawCaret(pt, tooltipSize); + } + ctx.lineTo(x, y + radius); + ctx.quadraticCurveTo(x, y, x + radius, y); + ctx.closePath(); + + ctx.fill(); + + if (vm.borderWidth > 0) { + ctx.stroke(); + } + }, + + draw: function() { + var ctx = this._chart.ctx; + var vm = this._view; + + if (vm.opacity === 0) { + return; + } + + var tooltipSize = { + width: vm.width, + height: vm.height + }; + var pt = { + x: vm.x, + y: vm.y + }; + + // IE11/Edge does not like very small opacities, so snap to 0 + var opacity = Math.abs(vm.opacity < 1e-3) ? 0 : vm.opacity; + + // Truthy/falsey value for empty tooltip + var hasTooltipContent = vm.title.length || vm.beforeBody.length || vm.body.length || vm.afterBody.length || vm.footer.length; + + if (this._options.enabled && hasTooltipContent) { + // Draw Background + this.drawBackground(pt, vm, ctx, tooltipSize, opacity); + + // Draw Title, Body, and Footer + pt.x += vm.xPadding; + pt.y += vm.yPadding; + + // Titles + this.drawTitle(pt, vm, ctx, opacity); + + // Body + this.drawBody(pt, vm, ctx, opacity); + + // Footer + this.drawFooter(pt, vm, ctx, opacity); + } + }, + + /** + * Handle an event + * @private + * @param {IEvent} event - The event to handle + * @returns {Boolean} true if the tooltip changed + */ + handleEvent: function(e) { + var me = this; + var options = me._options; + var changed = false; + + me._lastActive = me._lastActive || []; + + // Find Active Elements for tooltips + if (e.type === 'mouseout') { + me._active = []; + } else { + me._active = me._chart.getElementsAtEventForMode(e, options.mode, options); + } + + // Remember Last Actives + changed = !helpers.arrayEquals(me._active, me._lastActive); + + // Only handle target event on tooltip change + if (changed) { + me._lastActive = me._active; + + if (options.enabled || options.custom) { + me._eventPosition = { + x: e.x, + y: e.y + }; + + me.update(true); + me.pivot(); + } + } + + return changed; + } +}); + +/** + * @namespace Chart.Tooltip.positioners + */ +exports.positioners = positioners; + + +},{"26":26,"27":27,"46":46}],37:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var Element = require(27); +var helpers = require(46); + +defaults._set('global', { + elements: { + arc: { + backgroundColor: defaults.global.defaultColor, + borderColor: '#fff', + borderWidth: 2 + } + } +}); + +module.exports = Element.extend({ + inLabelRange: function(mouseX) { + var vm = this._view; + + if (vm) { + return (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2)); + } + return false; + }, + + inRange: function(chartX, chartY) { + var vm = this._view; + + if (vm) { + var pointRelativePosition = helpers.getAngleFromPoint(vm, {x: chartX, y: chartY}); + var angle = pointRelativePosition.angle; + var distance = pointRelativePosition.distance; + + // Sanitise angle range + var startAngle = vm.startAngle; + var endAngle = vm.endAngle; + while (endAngle < startAngle) { + endAngle += 2.0 * Math.PI; + } + while (angle > endAngle) { + angle -= 2.0 * Math.PI; + } + while (angle < startAngle) { + angle += 2.0 * Math.PI; + } + + // Check if within the range of the open/close angle + var betweenAngles = (angle >= startAngle && angle <= endAngle); + var withinRadius = (distance >= vm.innerRadius && distance <= vm.outerRadius); + + return (betweenAngles && withinRadius); + } + return false; + }, + + getCenterPoint: function() { + var vm = this._view; + var halfAngle = (vm.startAngle + vm.endAngle) / 2; + var halfRadius = (vm.innerRadius + vm.outerRadius) / 2; + return { + x: vm.x + Math.cos(halfAngle) * halfRadius, + y: vm.y + Math.sin(halfAngle) * halfRadius + }; + }, + + getArea: function() { + var vm = this._view; + return Math.PI * ((vm.endAngle - vm.startAngle) / (2 * Math.PI)) * (Math.pow(vm.outerRadius, 2) - Math.pow(vm.innerRadius, 2)); + }, + + tooltipPosition: function() { + var vm = this._view; + var centreAngle = vm.startAngle + ((vm.endAngle - vm.startAngle) / 2); + var rangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius; + + return { + x: vm.x + (Math.cos(centreAngle) * rangeFromCentre), + y: vm.y + (Math.sin(centreAngle) * rangeFromCentre) + }; + }, + + draw: function() { + var ctx = this._chart.ctx; + var vm = this._view; + var sA = vm.startAngle; + var eA = vm.endAngle; + + ctx.beginPath(); + + ctx.arc(vm.x, vm.y, vm.outerRadius, sA, eA); + ctx.arc(vm.x, vm.y, vm.innerRadius, eA, sA, true); + + ctx.closePath(); + ctx.strokeStyle = vm.borderColor; + ctx.lineWidth = vm.borderWidth; + + ctx.fillStyle = vm.backgroundColor; + + ctx.fill(); + ctx.lineJoin = 'bevel'; + + if (vm.borderWidth) { + ctx.stroke(); + } + } +}); + +},{"26":26,"27":27,"46":46}],38:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var Element = require(27); +var helpers = require(46); + +var globalDefaults = defaults.global; + +defaults._set('global', { + elements: { + line: { + tension: 0.4, + backgroundColor: globalDefaults.defaultColor, + borderWidth: 3, + borderColor: globalDefaults.defaultColor, + borderCapStyle: 'butt', + borderDash: [], + borderDashOffset: 0.0, + borderJoinStyle: 'miter', + capBezierPoints: true, + fill: true, // do we fill in the area between the line and its base axis + } + } +}); + +module.exports = Element.extend({ + draw: function() { + var me = this; + var vm = me._view; + var ctx = me._chart.ctx; + var spanGaps = vm.spanGaps; + var points = me._children.slice(); // clone array + var globalOptionLineElements = globalDefaults.elements.line; + var lastDrawnIndex = -1; + var index, current, previous, currentVM; + + // If we are looping, adding the first point again + if (me._loop && points.length) { + points.push(points[0]); + } + + ctx.save(); + + // Stroke Line Options + ctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle; + + // IE 9 and 10 do not support line dash + if (ctx.setLineDash) { + ctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash); + } + + ctx.lineDashOffset = vm.borderDashOffset || globalOptionLineElements.borderDashOffset; + ctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle; + ctx.lineWidth = vm.borderWidth || globalOptionLineElements.borderWidth; + ctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor; + + // Stroke Line + ctx.beginPath(); + lastDrawnIndex = -1; + + for (index = 0; index < points.length; ++index) { + current = points[index]; + previous = helpers.previousItem(points, index); + currentVM = current._view; + + // First point moves to it's starting position no matter what + if (index === 0) { + if (!currentVM.skip) { + ctx.moveTo(currentVM.x, currentVM.y); + lastDrawnIndex = index; + } + } else { + previous = lastDrawnIndex === -1 ? previous : points[lastDrawnIndex]; + + if (!currentVM.skip) { + if ((lastDrawnIndex !== (index - 1) && !spanGaps) || lastDrawnIndex === -1) { + // There was a gap and this is the first point after the gap + ctx.moveTo(currentVM.x, currentVM.y); + } else { + // Line to next point + helpers.canvas.lineTo(ctx, previous._view, current._view); + } + lastDrawnIndex = index; + } + } + } + + ctx.stroke(); + ctx.restore(); + } +}); + +},{"26":26,"27":27,"46":46}],39:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var Element = require(27); +var helpers = require(46); + +var defaultColor = defaults.global.defaultColor; + +defaults._set('global', { + elements: { + point: { + radius: 3, + pointStyle: 'circle', + backgroundColor: defaultColor, + borderColor: defaultColor, + borderWidth: 1, + // Hover + hitRadius: 1, + hoverRadius: 4, + hoverBorderWidth: 1 + } + } +}); + +function xRange(mouseX) { + var vm = this._view; + return vm ? (Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius) : false; +} + +function yRange(mouseY) { + var vm = this._view; + return vm ? (Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius) : false; +} + +module.exports = Element.extend({ + inRange: function(mouseX, mouseY) { + var vm = this._view; + return vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false; + }, + + inLabelRange: xRange, + inXRange: xRange, + inYRange: yRange, + + getCenterPoint: function() { + var vm = this._view; + return { + x: vm.x, + y: vm.y + }; + }, + + getArea: function() { + return Math.PI * Math.pow(this._view.radius, 2); + }, + + tooltipPosition: function() { + var vm = this._view; + return { + x: vm.x, + y: vm.y, + padding: vm.radius + vm.borderWidth + }; + }, + + draw: function(chartArea) { + var vm = this._view; + var model = this._model; + var ctx = this._chart.ctx; + var pointStyle = vm.pointStyle; + var rotation = vm.rotation; + var radius = vm.radius; + var x = vm.x; + var y = vm.y; + var errMargin = 1.01; // 1.01 is margin for Accumulated error. (Especially Edge, IE.) + + if (vm.skip) { + return; + } + + // Clipping for Points. + if (chartArea === undefined || (model.x >= chartArea.left && chartArea.right * errMargin >= model.x && model.y >= chartArea.top && chartArea.bottom * errMargin >= model.y)) { + ctx.strokeStyle = vm.borderColor || defaultColor; + ctx.lineWidth = helpers.valueOrDefault(vm.borderWidth, defaults.global.elements.point.borderWidth); + ctx.fillStyle = vm.backgroundColor || defaultColor; + helpers.canvas.drawPoint(ctx, pointStyle, radius, x, y, rotation); + } + } +}); + +},{"26":26,"27":27,"46":46}],40:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var Element = require(27); + +defaults._set('global', { + elements: { + rectangle: { + backgroundColor: defaults.global.defaultColor, + borderColor: defaults.global.defaultColor, + borderSkipped: 'bottom', + borderWidth: 0 + } + } +}); + +function isVertical(bar) { + return bar._view.width !== undefined; +} + +/** + * Helper function to get the bounds of the bar regardless of the orientation + * @param bar {Chart.Element.Rectangle} the bar + * @return {Bounds} bounds of the bar + * @private + */ +function getBarBounds(bar) { + var vm = bar._view; + var x1, x2, y1, y2; + + if (isVertical(bar)) { + // vertical + var halfWidth = vm.width / 2; + x1 = vm.x - halfWidth; + x2 = vm.x + halfWidth; + y1 = Math.min(vm.y, vm.base); + y2 = Math.max(vm.y, vm.base); + } else { + // horizontal bar + var halfHeight = vm.height / 2; + x1 = Math.min(vm.x, vm.base); + x2 = Math.max(vm.x, vm.base); + y1 = vm.y - halfHeight; + y2 = vm.y + halfHeight; + } + + return { + left: x1, + top: y1, + right: x2, + bottom: y2 + }; +} + +module.exports = Element.extend({ + draw: function() { + var ctx = this._chart.ctx; + var vm = this._view; + var left, right, top, bottom, signX, signY, borderSkipped; + var borderWidth = vm.borderWidth; + + if (!vm.horizontal) { + // bar + left = vm.x - vm.width / 2; + right = vm.x + vm.width / 2; + top = vm.y; + bottom = vm.base; + signX = 1; + signY = bottom > top ? 1 : -1; + borderSkipped = vm.borderSkipped || 'bottom'; + } else { + // horizontal bar + left = vm.base; + right = vm.x; + top = vm.y - vm.height / 2; + bottom = vm.y + vm.height / 2; + signX = right > left ? 1 : -1; + signY = 1; + borderSkipped = vm.borderSkipped || 'left'; + } + + // Canvas doesn't allow us to stroke inside the width so we can + // adjust the sizes to fit if we're setting a stroke on the line + if (borderWidth) { + // borderWidth shold be less than bar width and bar height. + var barSize = Math.min(Math.abs(left - right), Math.abs(top - bottom)); + borderWidth = borderWidth > barSize ? barSize : borderWidth; + var halfStroke = borderWidth / 2; + // Adjust borderWidth when bar top position is near vm.base(zero). + var borderLeft = left + (borderSkipped !== 'left' ? halfStroke * signX : 0); + var borderRight = right + (borderSkipped !== 'right' ? -halfStroke * signX : 0); + var borderTop = top + (borderSkipped !== 'top' ? halfStroke * signY : 0); + var borderBottom = bottom + (borderSkipped !== 'bottom' ? -halfStroke * signY : 0); + // not become a vertical line? + if (borderLeft !== borderRight) { + top = borderTop; + bottom = borderBottom; + } + // not become a horizontal line? + if (borderTop !== borderBottom) { + left = borderLeft; + right = borderRight; + } + } + + ctx.beginPath(); + ctx.fillStyle = vm.backgroundColor; + ctx.strokeStyle = vm.borderColor; + ctx.lineWidth = borderWidth; + + // Corner points, from bottom-left to bottom-right clockwise + // | 1 2 | + // | 0 3 | + var corners = [ + [left, bottom], + [left, top], + [right, top], + [right, bottom] + ]; + + // Find first (starting) corner with fallback to 'bottom' + var borders = ['bottom', 'left', 'top', 'right']; + var startCorner = borders.indexOf(borderSkipped, 0); + if (startCorner === -1) { + startCorner = 0; + } + + function cornerAt(index) { + return corners[(startCorner + index) % 4]; + } + + // Draw rectangle from 'startCorner' + var corner = cornerAt(0); + ctx.moveTo(corner[0], corner[1]); + + for (var i = 1; i < 4; i++) { + corner = cornerAt(i); + ctx.lineTo(corner[0], corner[1]); + } + + ctx.fill(); + if (borderWidth) { + ctx.stroke(); + } + }, + + height: function() { + var vm = this._view; + return vm.base - vm.y; + }, + + inRange: function(mouseX, mouseY) { + var inRange = false; + + if (this._view) { + var bounds = getBarBounds(this); + inRange = mouseX >= bounds.left && mouseX <= bounds.right && mouseY >= bounds.top && mouseY <= bounds.bottom; + } + + return inRange; + }, + + inLabelRange: function(mouseX, mouseY) { + var me = this; + if (!me._view) { + return false; + } + + var inRange = false; + var bounds = getBarBounds(me); + + if (isVertical(me)) { + inRange = mouseX >= bounds.left && mouseX <= bounds.right; + } else { + inRange = mouseY >= bounds.top && mouseY <= bounds.bottom; + } + + return inRange; + }, + + inXRange: function(mouseX) { + var bounds = getBarBounds(this); + return mouseX >= bounds.left && mouseX <= bounds.right; + }, + + inYRange: function(mouseY) { + var bounds = getBarBounds(this); + return mouseY >= bounds.top && mouseY <= bounds.bottom; + }, + + getCenterPoint: function() { + var vm = this._view; + var x, y; + if (isVertical(this)) { + x = vm.x; + y = (vm.y + vm.base) / 2; + } else { + x = (vm.x + vm.base) / 2; + y = vm.y; + } + + return {x: x, y: y}; + }, + + getArea: function() { + var vm = this._view; + return vm.width * Math.abs(vm.y - vm.base); + }, + + tooltipPosition: function() { + var vm = this._view; + return { + x: vm.x, + y: vm.y + }; + } +}); + +},{"26":26,"27":27}],41:[function(require,module,exports){ +'use strict'; + +module.exports = {}; +module.exports.Arc = require(37); +module.exports.Line = require(38); +module.exports.Point = require(39); +module.exports.Rectangle = require(40); + +},{"37":37,"38":38,"39":39,"40":40}],42:[function(require,module,exports){ +'use strict'; + +var helpers = require(43); + +/** + * @namespace Chart.helpers.canvas + */ +var exports = module.exports = { + /** + * Clears the entire canvas associated to the given `chart`. + * @param {Chart} chart - The chart for which to clear the canvas. + */ + clear: function(chart) { + chart.ctx.clearRect(0, 0, chart.width, chart.height); + }, + + /** + * Creates a "path" for a rectangle with rounded corners at position (x, y) with a + * given size (width, height) and the same `radius` for all corners. + * @param {CanvasRenderingContext2D} ctx - The canvas 2D Context. + * @param {Number} x - The x axis of the coordinate for the rectangle starting point. + * @param {Number} y - The y axis of the coordinate for the rectangle starting point. + * @param {Number} width - The rectangle's width. + * @param {Number} height - The rectangle's height. + * @param {Number} radius - The rounded amount (in pixels) for the four corners. + * @todo handle `radius` as top-left, top-right, bottom-right, bottom-left array/object? + */ + roundedRect: function(ctx, x, y, width, height, radius) { + if (radius) { + // NOTE(SB) `epsilon` helps to prevent minor artifacts appearing + // on Chrome when `r` is exactly half the height or the width. + var epsilon = 0.0000001; + var r = Math.min(radius, (height / 2) - epsilon, (width / 2) - epsilon); + + ctx.moveTo(x + r, y); + ctx.lineTo(x + width - r, y); + ctx.arcTo(x + width, y, x + width, y + r, r); + ctx.lineTo(x + width, y + height - r); + ctx.arcTo(x + width, y + height, x + width - r, y + height, r); + ctx.lineTo(x + r, y + height); + ctx.arcTo(x, y + height, x, y + height - r, r); + ctx.lineTo(x, y + r); + ctx.arcTo(x, y, x + r, y, r); + ctx.closePath(); + ctx.moveTo(x, y); + } else { + ctx.rect(x, y, width, height); + } + }, + + drawPoint: function(ctx, style, radius, x, y, rotation) { + var type, edgeLength, xOffset, yOffset, height, size; + rotation = rotation || 0; + + if (style && typeof style === 'object') { + type = style.toString(); + if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') { + ctx.drawImage(style, x - style.width / 2, y - style.height / 2, style.width, style.height); + return; + } + } + + if (isNaN(radius) || radius <= 0) { + return; + } + + ctx.save(); + ctx.translate(x, y); + ctx.rotate(rotation * Math.PI / 180); + ctx.beginPath(); + + switch (style) { + // Default includes circle + default: + ctx.arc(0, 0, radius, 0, Math.PI * 2); + ctx.closePath(); + break; + case 'triangle': + edgeLength = 3 * radius / Math.sqrt(3); + height = edgeLength * Math.sqrt(3) / 2; + ctx.moveTo(-edgeLength / 2, height / 3); + ctx.lineTo(edgeLength / 2, height / 3); + ctx.lineTo(0, -2 * height / 3); + ctx.closePath(); + break; + case 'rect': + size = 1 / Math.SQRT2 * radius; + ctx.rect(-size, -size, 2 * size, 2 * size); + break; + case 'rectRounded': + var offset = radius / Math.SQRT2; + var leftX = -offset; + var topY = -offset; + var sideSize = Math.SQRT2 * radius; + + // NOTE(SB) the rounded rect implementation changed to use `arcTo` + // instead of `quadraticCurveTo` since it generates better results + // when rect is almost a circle. 0.425 (instead of 0.5) produces + // results visually closer to the previous impl. + this.roundedRect(ctx, leftX, topY, sideSize, sideSize, radius * 0.425); + break; + case 'rectRot': + size = 1 / Math.SQRT2 * radius; + ctx.moveTo(-size, 0); + ctx.lineTo(0, size); + ctx.lineTo(size, 0); + ctx.lineTo(0, -size); + ctx.closePath(); + break; + case 'cross': + ctx.moveTo(0, radius); + ctx.lineTo(0, -radius); + ctx.moveTo(-radius, 0); + ctx.lineTo(radius, 0); + break; + case 'crossRot': + xOffset = Math.cos(Math.PI / 4) * radius; + yOffset = Math.sin(Math.PI / 4) * radius; + ctx.moveTo(-xOffset, -yOffset); + ctx.lineTo(xOffset, yOffset); + ctx.moveTo(-xOffset, yOffset); + ctx.lineTo(xOffset, -yOffset); + break; + case 'star': + ctx.moveTo(0, radius); + ctx.lineTo(0, -radius); + ctx.moveTo(-radius, 0); + ctx.lineTo(radius, 0); + xOffset = Math.cos(Math.PI / 4) * radius; + yOffset = Math.sin(Math.PI / 4) * radius; + ctx.moveTo(-xOffset, -yOffset); + ctx.lineTo(xOffset, yOffset); + ctx.moveTo(-xOffset, yOffset); + ctx.lineTo(xOffset, -yOffset); + break; + case 'line': + ctx.moveTo(-radius, 0); + ctx.lineTo(radius, 0); + break; + case 'dash': + ctx.moveTo(0, 0); + ctx.lineTo(radius, 0); + break; + } + + ctx.fill(); + ctx.stroke(); + ctx.restore(); + }, + + clipArea: function(ctx, area) { + ctx.save(); + ctx.beginPath(); + ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top); + ctx.clip(); + }, + + unclipArea: function(ctx) { + ctx.restore(); + }, + + lineTo: function(ctx, previous, target, flip) { + if (target.steppedLine) { + if ((target.steppedLine === 'after' && !flip) || (target.steppedLine !== 'after' && flip)) { + ctx.lineTo(previous.x, target.y); + } else { + ctx.lineTo(target.x, previous.y); + } + ctx.lineTo(target.x, target.y); + return; + } + + if (!target.tension) { + ctx.lineTo(target.x, target.y); + return; + } + + ctx.bezierCurveTo( + flip ? previous.controlPointPreviousX : previous.controlPointNextX, + flip ? previous.controlPointPreviousY : previous.controlPointNextY, + flip ? target.controlPointNextX : target.controlPointPreviousX, + flip ? target.controlPointNextY : target.controlPointPreviousY, + target.x, + target.y); + } +}; + +// DEPRECATIONS + +/** + * Provided for backward compatibility, use Chart.helpers.canvas.clear instead. + * @namespace Chart.helpers.clear + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers.clear = exports.clear; + +/** + * Provided for backward compatibility, use Chart.helpers.canvas.roundedRect instead. + * @namespace Chart.helpers.drawRoundedRectangle + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers.drawRoundedRectangle = function(ctx) { + ctx.beginPath(); + exports.roundedRect.apply(exports, arguments); +}; + +},{"43":43}],43:[function(require,module,exports){ +'use strict'; + +/** + * @namespace Chart.helpers + */ +var helpers = { + /** + * An empty function that can be used, for example, for optional callback. + */ + noop: function() {}, + + /** + * Returns a unique id, sequentially generated from a global variable. + * @returns {Number} + * @function + */ + uid: (function() { + var id = 0; + return function() { + return id++; + }; + }()), + + /** + * Returns true if `value` is neither null nor undefined, else returns false. + * @param {*} value - The value to test. + * @returns {Boolean} + * @since 2.7.0 + */ + isNullOrUndef: function(value) { + return value === null || typeof value === 'undefined'; + }, + + /** + * Returns true if `value` is an array, else returns false. + * @param {*} value - The value to test. + * @returns {Boolean} + * @function + */ + isArray: Array.isArray ? Array.isArray : function(value) { + return Object.prototype.toString.call(value) === '[object Array]'; + }, + + /** + * Returns true if `value` is an object (excluding null), else returns false. + * @param {*} value - The value to test. + * @returns {Boolean} + * @since 2.7.0 + */ + isObject: function(value) { + return value !== null && Object.prototype.toString.call(value) === '[object Object]'; + }, + + /** + * Returns `value` if defined, else returns `defaultValue`. + * @param {*} value - The value to return if defined. + * @param {*} defaultValue - The value to return if `value` is undefined. + * @returns {*} + */ + valueOrDefault: function(value, defaultValue) { + return typeof value === 'undefined' ? defaultValue : value; + }, + + /** + * Returns value at the given `index` in array if defined, else returns `defaultValue`. + * @param {Array} value - The array to lookup for value at `index`. + * @param {Number} index - The index in `value` to lookup for value. + * @param {*} defaultValue - The value to return if `value[index]` is undefined. + * @returns {*} + */ + valueAtIndexOrDefault: function(value, index, defaultValue) { + return helpers.valueOrDefault(helpers.isArray(value) ? value[index] : value, defaultValue); + }, + + /** + * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the + * value returned by `fn`. If `fn` is not a function, this method returns undefined. + * @param {Function} fn - The function to call. + * @param {Array|undefined|null} args - The arguments with which `fn` should be called. + * @param {Object} [thisArg] - The value of `this` provided for the call to `fn`. + * @returns {*} + */ + callback: function(fn, args, thisArg) { + if (fn && typeof fn.call === 'function') { + return fn.apply(thisArg, args); + } + }, + + /** + * Note(SB) for performance sake, this method should only be used when loopable type + * is unknown or in none intensive code (not called often and small loopable). Else + * it's preferable to use a regular for() loop and save extra function calls. + * @param {Object|Array} loopable - The object or array to be iterated. + * @param {Function} fn - The function to call for each item. + * @param {Object} [thisArg] - The value of `this` provided for the call to `fn`. + * @param {Boolean} [reverse] - If true, iterates backward on the loopable. + */ + each: function(loopable, fn, thisArg, reverse) { + var i, len, keys; + if (helpers.isArray(loopable)) { + len = loopable.length; + if (reverse) { + for (i = len - 1; i >= 0; i--) { + fn.call(thisArg, loopable[i], i); + } + } else { + for (i = 0; i < len; i++) { + fn.call(thisArg, loopable[i], i); + } + } + } else if (helpers.isObject(loopable)) { + keys = Object.keys(loopable); + len = keys.length; + for (i = 0; i < len; i++) { + fn.call(thisArg, loopable[keys[i]], keys[i]); + } + } + }, + + /** + * Returns true if the `a0` and `a1` arrays have the same content, else returns false. + * @see http://stackoverflow.com/a/14853974 + * @param {Array} a0 - The array to compare + * @param {Array} a1 - The array to compare + * @returns {Boolean} + */ + arrayEquals: function(a0, a1) { + var i, ilen, v0, v1; + + if (!a0 || !a1 || a0.length !== a1.length) { + return false; + } + + for (i = 0, ilen = a0.length; i < ilen; ++i) { + v0 = a0[i]; + v1 = a1[i]; + + if (v0 instanceof Array && v1 instanceof Array) { + if (!helpers.arrayEquals(v0, v1)) { + return false; + } + } else if (v0 !== v1) { + // NOTE: two different object instances will never be equal: {x:20} != {x:20} + return false; + } + } + + return true; + }, + + /** + * Returns a deep copy of `source` without keeping references on objects and arrays. + * @param {*} source - The value to clone. + * @returns {*} + */ + clone: function(source) { + if (helpers.isArray(source)) { + return source.map(helpers.clone); + } + + if (helpers.isObject(source)) { + var target = {}; + var keys = Object.keys(source); + var klen = keys.length; + var k = 0; + + for (; k < klen; ++k) { + target[keys[k]] = helpers.clone(source[keys[k]]); + } + + return target; + } + + return source; + }, + + /** + * The default merger when Chart.helpers.merge is called without merger option. + * Note(SB): this method is also used by configMerge and scaleMerge as fallback. + * @private + */ + _merger: function(key, target, source, options) { + var tval = target[key]; + var sval = source[key]; + + if (helpers.isObject(tval) && helpers.isObject(sval)) { + helpers.merge(tval, sval, options); + } else { + target[key] = helpers.clone(sval); + } + }, + + /** + * Merges source[key] in target[key] only if target[key] is undefined. + * @private + */ + _mergerIf: function(key, target, source) { + var tval = target[key]; + var sval = source[key]; + + if (helpers.isObject(tval) && helpers.isObject(sval)) { + helpers.mergeIf(tval, sval); + } else if (!target.hasOwnProperty(key)) { + target[key] = helpers.clone(sval); + } + }, + + /** + * Recursively deep copies `source` properties into `target` with the given `options`. + * IMPORTANT: `target` is not cloned and will be updated with `source` properties. + * @param {Object} target - The target object in which all sources are merged into. + * @param {Object|Array(Object)} source - Object(s) to merge into `target`. + * @param {Object} [options] - Merging options: + * @param {Function} [options.merger] - The merge method (key, target, source, options) + * @returns {Object} The `target` object. + */ + merge: function(target, source, options) { + var sources = helpers.isArray(source) ? source : [source]; + var ilen = sources.length; + var merge, i, keys, klen, k; + + if (!helpers.isObject(target)) { + return target; + } + + options = options || {}; + merge = options.merger || helpers._merger; + + for (i = 0; i < ilen; ++i) { + source = sources[i]; + if (!helpers.isObject(source)) { + continue; + } + + keys = Object.keys(source); + for (k = 0, klen = keys.length; k < klen; ++k) { + merge(keys[k], target, source, options); + } + } + + return target; + }, + + /** + * Recursively deep copies `source` properties into `target` *only* if not defined in target. + * IMPORTANT: `target` is not cloned and will be updated with `source` properties. + * @param {Object} target - The target object in which all sources are merged into. + * @param {Object|Array(Object)} source - Object(s) to merge into `target`. + * @returns {Object} The `target` object. + */ + mergeIf: function(target, source) { + return helpers.merge(target, source, {merger: helpers._mergerIf}); + }, + + /** + * Applies the contents of two or more objects together into the first object. + * @param {Object} target - The target object in which all objects are merged into. + * @param {Object} arg1 - Object containing additional properties to merge in target. + * @param {Object} argN - Additional objects containing properties to merge in target. + * @returns {Object} The `target` object. + */ + extend: function(target) { + var setFn = function(value, key) { + target[key] = value; + }; + for (var i = 1, ilen = arguments.length; i < ilen; ++i) { + helpers.each(arguments[i], setFn); + } + return target; + }, + + /** + * Basic javascript inheritance based on the model created in Backbone.js + */ + inherits: function(extensions) { + var me = this; + var ChartElement = (extensions && extensions.hasOwnProperty('constructor')) ? extensions.constructor : function() { + return me.apply(this, arguments); + }; + + var Surrogate = function() { + this.constructor = ChartElement; + }; + + Surrogate.prototype = me.prototype; + ChartElement.prototype = new Surrogate(); + ChartElement.extend = helpers.inherits; + + if (extensions) { + helpers.extend(ChartElement.prototype, extensions); + } + + ChartElement.__super__ = me.prototype; + return ChartElement; + } +}; + +module.exports = helpers; + +// DEPRECATIONS + +/** + * Provided for backward compatibility, use Chart.helpers.callback instead. + * @function Chart.helpers.callCallback + * @deprecated since version 2.6.0 + * @todo remove at version 3 + * @private + */ +helpers.callCallback = helpers.callback; + +/** + * Provided for backward compatibility, use Array.prototype.indexOf instead. + * Array.prototype.indexOf compatibility: Chrome, Opera, Safari, FF1.5+, IE9+ + * @function Chart.helpers.indexOf + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers.indexOf = function(array, item, fromIndex) { + return Array.prototype.indexOf.call(array, item, fromIndex); +}; + +/** + * Provided for backward compatibility, use Chart.helpers.valueOrDefault instead. + * @function Chart.helpers.getValueOrDefault + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers.getValueOrDefault = helpers.valueOrDefault; + +/** + * Provided for backward compatibility, use Chart.helpers.valueAtIndexOrDefault instead. + * @function Chart.helpers.getValueAtIndexOrDefault + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers.getValueAtIndexOrDefault = helpers.valueAtIndexOrDefault; + +},{}],44:[function(require,module,exports){ +'use strict'; + +var helpers = require(43); + +/** + * Easing functions adapted from Robert Penner's easing equations. + * @namespace Chart.helpers.easingEffects + * @see http://www.robertpenner.com/easing/ + */ +var effects = { + linear: function(t) { + return t; + }, + + easeInQuad: function(t) { + return t * t; + }, + + easeOutQuad: function(t) { + return -t * (t - 2); + }, + + easeInOutQuad: function(t) { + if ((t /= 0.5) < 1) { + return 0.5 * t * t; + } + return -0.5 * ((--t) * (t - 2) - 1); + }, + + easeInCubic: function(t) { + return t * t * t; + }, + + easeOutCubic: function(t) { + return (t = t - 1) * t * t + 1; + }, + + easeInOutCubic: function(t) { + if ((t /= 0.5) < 1) { + return 0.5 * t * t * t; + } + return 0.5 * ((t -= 2) * t * t + 2); + }, + + easeInQuart: function(t) { + return t * t * t * t; + }, + + easeOutQuart: function(t) { + return -((t = t - 1) * t * t * t - 1); + }, + + easeInOutQuart: function(t) { + if ((t /= 0.5) < 1) { + return 0.5 * t * t * t * t; + } + return -0.5 * ((t -= 2) * t * t * t - 2); + }, + + easeInQuint: function(t) { + return t * t * t * t * t; + }, + + easeOutQuint: function(t) { + return (t = t - 1) * t * t * t * t + 1; + }, + + easeInOutQuint: function(t) { + if ((t /= 0.5) < 1) { + return 0.5 * t * t * t * t * t; + } + return 0.5 * ((t -= 2) * t * t * t * t + 2); + }, + + easeInSine: function(t) { + return -Math.cos(t * (Math.PI / 2)) + 1; + }, + + easeOutSine: function(t) { + return Math.sin(t * (Math.PI / 2)); + }, + + easeInOutSine: function(t) { + return -0.5 * (Math.cos(Math.PI * t) - 1); + }, + + easeInExpo: function(t) { + return (t === 0) ? 0 : Math.pow(2, 10 * (t - 1)); + }, + + easeOutExpo: function(t) { + return (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1; + }, + + easeInOutExpo: function(t) { + if (t === 0) { + return 0; + } + if (t === 1) { + return 1; + } + if ((t /= 0.5) < 1) { + return 0.5 * Math.pow(2, 10 * (t - 1)); + } + return 0.5 * (-Math.pow(2, -10 * --t) + 2); + }, + + easeInCirc: function(t) { + if (t >= 1) { + return t; + } + return -(Math.sqrt(1 - t * t) - 1); + }, + + easeOutCirc: function(t) { + return Math.sqrt(1 - (t = t - 1) * t); + }, + + easeInOutCirc: function(t) { + if ((t /= 0.5) < 1) { + return -0.5 * (Math.sqrt(1 - t * t) - 1); + } + return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1); + }, + + easeInElastic: function(t) { + var s = 1.70158; + var p = 0; + var a = 1; + if (t === 0) { + return 0; + } + if (t === 1) { + return 1; + } + if (!p) { + p = 0.3; + } + if (a < 1) { + a = 1; + s = p / 4; + } else { + s = p / (2 * Math.PI) * Math.asin(1 / a); + } + return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p)); + }, + + easeOutElastic: function(t) { + var s = 1.70158; + var p = 0; + var a = 1; + if (t === 0) { + return 0; + } + if (t === 1) { + return 1; + } + if (!p) { + p = 0.3; + } + if (a < 1) { + a = 1; + s = p / 4; + } else { + s = p / (2 * Math.PI) * Math.asin(1 / a); + } + return a * Math.pow(2, -10 * t) * Math.sin((t - s) * (2 * Math.PI) / p) + 1; + }, + + easeInOutElastic: function(t) { + var s = 1.70158; + var p = 0; + var a = 1; + if (t === 0) { + return 0; + } + if ((t /= 0.5) === 2) { + return 1; + } + if (!p) { + p = 0.45; + } + if (a < 1) { + a = 1; + s = p / 4; + } else { + s = p / (2 * Math.PI) * Math.asin(1 / a); + } + if (t < 1) { + return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p)); + } + return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p) * 0.5 + 1; + }, + easeInBack: function(t) { + var s = 1.70158; + return t * t * ((s + 1) * t - s); + }, + + easeOutBack: function(t) { + var s = 1.70158; + return (t = t - 1) * t * ((s + 1) * t + s) + 1; + }, + + easeInOutBack: function(t) { + var s = 1.70158; + if ((t /= 0.5) < 1) { + return 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s)); + } + return 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2); + }, + + easeInBounce: function(t) { + return 1 - effects.easeOutBounce(1 - t); + }, + + easeOutBounce: function(t) { + if (t < (1 / 2.75)) { + return 7.5625 * t * t; + } + if (t < (2 / 2.75)) { + return 7.5625 * (t -= (1.5 / 2.75)) * t + 0.75; + } + if (t < (2.5 / 2.75)) { + return 7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375; + } + return 7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375; + }, + + easeInOutBounce: function(t) { + if (t < 0.5) { + return effects.easeInBounce(t * 2) * 0.5; + } + return effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5; + } +}; + +module.exports = { + effects: effects +}; + +// DEPRECATIONS + +/** + * Provided for backward compatibility, use Chart.helpers.easing.effects instead. + * @function Chart.helpers.easingEffects + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers.easingEffects = effects; + +},{"43":43}],45:[function(require,module,exports){ +'use strict'; + +var helpers = require(43); + +/** + * @alias Chart.helpers.options + * @namespace + */ +module.exports = { + /** + * Converts the given line height `value` in pixels for a specific font `size`. + * @param {Number|String} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em'). + * @param {Number} size - The font size (in pixels) used to resolve relative `value`. + * @returns {Number} The effective line height in pixels (size * 1.2 if value is invalid). + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height + * @since 2.7.0 + */ + toLineHeight: function(value, size) { + var matches = ('' + value).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/); + if (!matches || matches[1] === 'normal') { + return size * 1.2; + } + + value = +matches[2]; + + switch (matches[3]) { + case 'px': + return value; + case '%': + value /= 100; + break; + default: + break; + } + + return size * value; + }, + + /** + * Converts the given value into a padding object with pre-computed width/height. + * @param {Number|Object} value - If a number, set the value to all TRBL component, + * else, if and object, use defined properties and sets undefined ones to 0. + * @returns {Object} The padding values (top, right, bottom, left, width, height) + * @since 2.7.0 + */ + toPadding: function(value) { + var t, r, b, l; + + if (helpers.isObject(value)) { + t = +value.top || 0; + r = +value.right || 0; + b = +value.bottom || 0; + l = +value.left || 0; + } else { + t = r = b = l = +value || 0; + } + + return { + top: t, + right: r, + bottom: b, + left: l, + height: t + b, + width: l + r + }; + }, + + /** + * Evaluates the given `inputs` sequentially and returns the first defined value. + * @param {Array[]} inputs - An array of values, falling back to the last value. + * @param {Object} [context] - If defined and the current value is a function, the value + * is called with `context` as first argument and the result becomes the new input. + * @param {Number} [index] - If defined and the current value is an array, the value + * at `index` become the new input. + * @since 2.7.0 + */ + resolve: function(inputs, context, index) { + var i, ilen, value; + + for (i = 0, ilen = inputs.length; i < ilen; ++i) { + value = inputs[i]; + if (value === undefined) { + continue; + } + if (context !== undefined && typeof value === 'function') { + value = value(context); + } + if (index !== undefined && helpers.isArray(value)) { + value = value[index]; + } + if (value !== undefined) { + return value; + } + } + } +}; + +},{"43":43}],46:[function(require,module,exports){ +'use strict'; + +module.exports = require(43); +module.exports.easing = require(44); +module.exports.canvas = require(42); +module.exports.options = require(45); + +},{"42":42,"43":43,"44":44,"45":45}],47:[function(require,module,exports){ +/** + * Platform fallback implementation (minimal). + * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939 + */ + +module.exports = { + acquireContext: function(item) { + if (item && item.canvas) { + // Support for any object associated to a canvas (including a context2d) + item = item.canvas; + } + + return item && item.getContext('2d') || null; + } +}; + +},{}],48:[function(require,module,exports){ +/** + * Chart.Platform implementation for targeting a web browser + */ + +'use strict'; + +var helpers = require(46); + +var EXPANDO_KEY = '$chartjs'; +var CSS_PREFIX = 'chartjs-'; +var CSS_RENDER_MONITOR = CSS_PREFIX + 'render-monitor'; +var CSS_RENDER_ANIMATION = CSS_PREFIX + 'render-animation'; +var ANIMATION_START_EVENTS = ['animationstart', 'webkitAnimationStart']; + +/** + * DOM event types -> Chart.js event types. + * Note: only events with different types are mapped. + * @see https://developer.mozilla.org/en-US/docs/Web/Events + */ +var EVENT_TYPES = { + touchstart: 'mousedown', + touchmove: 'mousemove', + touchend: 'mouseup', + pointerenter: 'mouseenter', + pointerdown: 'mousedown', + pointermove: 'mousemove', + pointerup: 'mouseup', + pointerleave: 'mouseout', + pointerout: 'mouseout' +}; + +/** + * The "used" size is the final value of a dimension property after all calculations have + * been performed. This method uses the computed style of `element` but returns undefined + * if the computed style is not expressed in pixels. That can happen in some cases where + * `element` has a size relative to its parent and this last one is not yet displayed, + * for example because of `display: none` on a parent node. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value + * @returns {Number} Size in pixels or undefined if unknown. + */ +function readUsedSize(element, property) { + var value = helpers.getStyle(element, property); + var matches = value && value.match(/^(\d+)(\.\d+)?px$/); + return matches ? Number(matches[1]) : undefined; +} + +/** + * Initializes the canvas style and render size without modifying the canvas display size, + * since responsiveness is handled by the controller.resize() method. The config is used + * to determine the aspect ratio to apply in case no explicit height has been specified. + */ +function initCanvas(canvas, config) { + var style = canvas.style; + + // NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it + // returns null or '' if no explicit value has been set to the canvas attribute. + var renderHeight = canvas.getAttribute('height'); + var renderWidth = canvas.getAttribute('width'); + + // Chart.js modifies some canvas values that we want to restore on destroy + canvas[EXPANDO_KEY] = { + initial: { + height: renderHeight, + width: renderWidth, + style: { + display: style.display, + height: style.height, + width: style.width + } + } + }; + + // Force canvas to display as block to avoid extra space caused by inline + // elements, which would interfere with the responsive resize process. + // https://github.com/chartjs/Chart.js/issues/2538 + style.display = style.display || 'block'; + + if (renderWidth === null || renderWidth === '') { + var displayWidth = readUsedSize(canvas, 'width'); + if (displayWidth !== undefined) { + canvas.width = displayWidth; + } + } + + if (renderHeight === null || renderHeight === '') { + if (canvas.style.height === '') { + // If no explicit render height and style height, let's apply the aspect ratio, + // which one can be specified by the user but also by charts as default option + // (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2. + canvas.height = canvas.width / (config.options.aspectRatio || 2); + } else { + var displayHeight = readUsedSize(canvas, 'height'); + if (displayWidth !== undefined) { + canvas.height = displayHeight; + } + } + } + + return canvas; +} + +/** + * Detects support for options object argument in addEventListener. + * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support + * @private + */ +var supportsEventListenerOptions = (function() { + var supports = false; + try { + var options = Object.defineProperty({}, 'passive', { + get: function() { + supports = true; + } + }); + window.addEventListener('e', null, options); + } catch (e) { + // continue regardless of error + } + return supports; +}()); + +// Default passive to true as expected by Chrome for 'touchstart' and 'touchend' events. +// https://github.com/chartjs/Chart.js/issues/4287 +var eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false; + +function addEventListener(node, type, listener) { + node.addEventListener(type, listener, eventListenerOptions); +} + +function removeEventListener(node, type, listener) { + node.removeEventListener(type, listener, eventListenerOptions); +} + +function createEvent(type, chart, x, y, nativeEvent) { + return { + type: type, + chart: chart, + native: nativeEvent || null, + x: x !== undefined ? x : null, + y: y !== undefined ? y : null, + }; +} + +function fromNativeEvent(event, chart) { + var type = EVENT_TYPES[event.type] || event.type; + var pos = helpers.getRelativePosition(event, chart); + return createEvent(type, chart, pos.x, pos.y, event); +} + +function throttled(fn, thisArg) { + var ticking = false; + var args = []; + + return function() { + args = Array.prototype.slice.call(arguments); + thisArg = thisArg || this; + + if (!ticking) { + ticking = true; + helpers.requestAnimFrame.call(window, function() { + ticking = false; + fn.apply(thisArg, args); + }); + } + }; +} + +// Implementation based on https://github.com/marcj/css-element-queries +function createResizer(handler) { + var resizer = document.createElement('div'); + var cls = CSS_PREFIX + 'size-monitor'; + var maxSize = 1000000; + var style = + 'position:absolute;' + + 'left:0;' + + 'top:0;' + + 'right:0;' + + 'bottom:0;' + + 'overflow:hidden;' + + 'pointer-events:none;' + + 'visibility:hidden;' + + 'z-index:-1;'; + + resizer.style.cssText = style; + resizer.className = cls; + resizer.innerHTML = + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    '; + + var expand = resizer.childNodes[0]; + var shrink = resizer.childNodes[1]; + + resizer._reset = function() { + expand.scrollLeft = maxSize; + expand.scrollTop = maxSize; + shrink.scrollLeft = maxSize; + shrink.scrollTop = maxSize; + }; + var onScroll = function() { + resizer._reset(); + handler(); + }; + + addEventListener(expand, 'scroll', onScroll.bind(expand, 'expand')); + addEventListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink')); + + return resizer; +} + +// https://davidwalsh.name/detect-node-insertion +function watchForRender(node, handler) { + var expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {}); + var proxy = expando.renderProxy = function(e) { + if (e.animationName === CSS_RENDER_ANIMATION) { + handler(); + } + }; + + helpers.each(ANIMATION_START_EVENTS, function(type) { + addEventListener(node, type, proxy); + }); + + // #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class + // is removed then added back immediately (same animation frame?). Accessing the + // `offsetParent` property will force a reflow and re-evaluate the CSS animation. + // https://gist.github.com/paulirish/5d52fb081b3570c81e3a#box-metrics + // https://github.com/chartjs/Chart.js/issues/4737 + expando.reflow = !!node.offsetParent; + + node.classList.add(CSS_RENDER_MONITOR); +} + +function unwatchForRender(node) { + var expando = node[EXPANDO_KEY] || {}; + var proxy = expando.renderProxy; + + if (proxy) { + helpers.each(ANIMATION_START_EVENTS, function(type) { + removeEventListener(node, type, proxy); + }); + + delete expando.renderProxy; + } + + node.classList.remove(CSS_RENDER_MONITOR); +} + +function addResizeListener(node, listener, chart) { + var expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {}); + + // Let's keep track of this added resizer and thus avoid DOM query when removing it. + var resizer = expando.resizer = createResizer(throttled(function() { + if (expando.resizer) { + return listener(createEvent('resize', chart)); + } + })); + + // The resizer needs to be attached to the node parent, so we first need to be + // sure that `node` is attached to the DOM before injecting the resizer element. + watchForRender(node, function() { + if (expando.resizer) { + var container = node.parentNode; + if (container && container !== resizer.parentNode) { + container.insertBefore(resizer, container.firstChild); + } + + // The container size might have changed, let's reset the resizer state. + resizer._reset(); + } + }); +} + +function removeResizeListener(node) { + var expando = node[EXPANDO_KEY] || {}; + var resizer = expando.resizer; + + delete expando.resizer; + unwatchForRender(node); + + if (resizer && resizer.parentNode) { + resizer.parentNode.removeChild(resizer); + } +} + +function injectCSS(platform, css) { + // http://stackoverflow.com/q/3922139 + var style = platform._style || document.createElement('style'); + if (!platform._style) { + platform._style = style; + css = '/* Chart.js */\n' + css; + style.setAttribute('type', 'text/css'); + document.getElementsByTagName('head')[0].appendChild(style); + } + + style.appendChild(document.createTextNode(css)); +} + +module.exports = { + /** + * This property holds whether this platform is enabled for the current environment. + * Currently used by platform.js to select the proper implementation. + * @private + */ + _enabled: typeof window !== 'undefined' && typeof document !== 'undefined', + + initialize: function() { + var keyframes = 'from{opacity:0.99}to{opacity:1}'; + + injectCSS(this, + // DOM rendering detection + // https://davidwalsh.name/detect-node-insertion + '@-webkit-keyframes ' + CSS_RENDER_ANIMATION + '{' + keyframes + '}' + + '@keyframes ' + CSS_RENDER_ANIMATION + '{' + keyframes + '}' + + '.' + CSS_RENDER_MONITOR + '{' + + '-webkit-animation:' + CSS_RENDER_ANIMATION + ' 0.001s;' + + 'animation:' + CSS_RENDER_ANIMATION + ' 0.001s;' + + '}' + ); + }, + + acquireContext: function(item, config) { + if (typeof item === 'string') { + item = document.getElementById(item); + } else if (item.length) { + // Support for array based queries (such as jQuery) + item = item[0]; + } + + if (item && item.canvas) { + // Support for any object associated to a canvas (including a context2d) + item = item.canvas; + } + + // To prevent canvas fingerprinting, some add-ons undefine the getContext + // method, for example: https://github.com/kkapsner/CanvasBlocker + // https://github.com/chartjs/Chart.js/issues/2807 + var context = item && item.getContext && item.getContext('2d'); + + // `instanceof HTMLCanvasElement/CanvasRenderingContext2D` fails when the item is + // inside an iframe or when running in a protected environment. We could guess the + // types from their toString() value but let's keep things flexible and assume it's + // a sufficient condition if the item has a context2D which has item as `canvas`. + // https://github.com/chartjs/Chart.js/issues/3887 + // https://github.com/chartjs/Chart.js/issues/4102 + // https://github.com/chartjs/Chart.js/issues/4152 + if (context && context.canvas === item) { + initCanvas(item, config); + return context; + } + + return null; + }, + + releaseContext: function(context) { + var canvas = context.canvas; + if (!canvas[EXPANDO_KEY]) { + return; + } + + var initial = canvas[EXPANDO_KEY].initial; + ['height', 'width'].forEach(function(prop) { + var value = initial[prop]; + if (helpers.isNullOrUndef(value)) { + canvas.removeAttribute(prop); + } else { + canvas.setAttribute(prop, value); + } + }); + + helpers.each(initial.style || {}, function(value, key) { + canvas.style[key] = value; + }); + + // The canvas render size might have been changed (and thus the state stack discarded), + // we can't use save() and restore() to restore the initial state. So make sure that at + // least the canvas context is reset to the default state by setting the canvas width. + // https://www.w3.org/TR/2011/WD-html5-20110525/the-canvas-element.html + canvas.width = canvas.width; + + delete canvas[EXPANDO_KEY]; + }, + + addEventListener: function(chart, type, listener) { + var canvas = chart.canvas; + if (type === 'resize') { + // Note: the resize event is not supported on all browsers. + addResizeListener(canvas, listener, chart); + return; + } + + var expando = listener[EXPANDO_KEY] || (listener[EXPANDO_KEY] = {}); + var proxies = expando.proxies || (expando.proxies = {}); + var proxy = proxies[chart.id + '_' + type] = function(event) { + listener(fromNativeEvent(event, chart)); + }; + + addEventListener(canvas, type, proxy); + }, + + removeEventListener: function(chart, type, listener) { + var canvas = chart.canvas; + if (type === 'resize') { + // Note: the resize event is not supported on all browsers. + removeResizeListener(canvas, listener); + return; + } + + var expando = listener[EXPANDO_KEY] || {}; + var proxies = expando.proxies || {}; + var proxy = proxies[chart.id + '_' + type]; + if (!proxy) { + return; + } + + removeEventListener(canvas, type, proxy); + } +}; + +// DEPRECATIONS + +/** + * Provided for backward compatibility, use EventTarget.addEventListener instead. + * EventTarget.addEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+ + * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener + * @function Chart.helpers.addEvent + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers.addEvent = addEventListener; + +/** + * Provided for backward compatibility, use EventTarget.removeEventListener instead. + * EventTarget.removeEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+ + * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener + * @function Chart.helpers.removeEvent + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers.removeEvent = removeEventListener; + +},{"46":46}],49:[function(require,module,exports){ +'use strict'; + +var helpers = require(46); +var basic = require(47); +var dom = require(48); + +// @TODO Make possible to select another platform at build time. +var implementation = dom._enabled ? dom : basic; + +/** + * @namespace Chart.platform + * @see https://chartjs.gitbooks.io/proposals/content/Platform.html + * @since 2.4.0 + */ +module.exports = helpers.extend({ + /** + * @since 2.7.0 + */ + initialize: function() {}, + + /** + * Called at chart construction time, returns a context2d instance implementing + * the [W3C Canvas 2D Context API standard]{@link https://www.w3.org/TR/2dcontext/}. + * @param {*} item - The native item from which to acquire context (platform specific) + * @param {Object} options - The chart options + * @returns {CanvasRenderingContext2D} context2d instance + */ + acquireContext: function() {}, + + /** + * Called at chart destruction time, releases any resources associated to the context + * previously returned by the acquireContext() method. + * @param {CanvasRenderingContext2D} context - The context2d instance + * @returns {Boolean} true if the method succeeded, else false + */ + releaseContext: function() {}, + + /** + * Registers the specified listener on the given chart. + * @param {Chart} chart - Chart from which to listen for event + * @param {String} type - The ({@link IEvent}) type to listen for + * @param {Function} listener - Receives a notification (an object that implements + * the {@link IEvent} interface) when an event of the specified type occurs. + */ + addEventListener: function() {}, + + /** + * Removes the specified listener previously registered with addEventListener. + * @param {Chart} chart -Chart from which to remove the listener + * @param {String} type - The ({@link IEvent}) type to remove + * @param {Function} listener - The listener function to remove from the event target. + */ + removeEventListener: function() {} + +}, implementation); + +/** + * @interface IPlatform + * Allows abstracting platform dependencies away from the chart + * @borrows Chart.platform.acquireContext as acquireContext + * @borrows Chart.platform.releaseContext as releaseContext + * @borrows Chart.platform.addEventListener as addEventListener + * @borrows Chart.platform.removeEventListener as removeEventListener + */ + +/** + * @interface IEvent + * @prop {String} type - The event type name, possible values are: + * 'contextmenu', 'mouseenter', 'mousedown', 'mousemove', 'mouseup', 'mouseout', + * 'click', 'dblclick', 'keydown', 'keypress', 'keyup' and 'resize' + * @prop {*} native - The original native event (null for emulated events, e.g. 'resize') + * @prop {Number} x - The mouse x position, relative to the canvas (null for incompatible events) + * @prop {Number} y - The mouse y position, relative to the canvas (null for incompatible events) + */ + +},{"46":46,"47":47,"48":48}],50:[function(require,module,exports){ +'use strict'; + +module.exports = {}; +module.exports.filler = require(51); +module.exports.legend = require(52); +module.exports.title = require(53); + +},{"51":51,"52":52,"53":53}],51:[function(require,module,exports){ +/** + * Plugin based on discussion from the following Chart.js issues: + * @see https://github.com/chartjs/Chart.js/issues/2380#issuecomment-279961569 + * @see https://github.com/chartjs/Chart.js/issues/2440#issuecomment-256461897 + */ + +'use strict'; + +var defaults = require(26); +var elements = require(41); +var helpers = require(46); + +defaults._set('global', { + plugins: { + filler: { + propagate: true + } + } +}); + +var mappers = { + dataset: function(source) { + var index = source.fill; + var chart = source.chart; + var meta = chart.getDatasetMeta(index); + var visible = meta && chart.isDatasetVisible(index); + var points = (visible && meta.dataset._children) || []; + var length = points.length || 0; + + return !length ? null : function(point, i) { + return (i < length && points[i]._view) || null; + }; + }, + + boundary: function(source) { + var boundary = source.boundary; + var x = boundary ? boundary.x : null; + var y = boundary ? boundary.y : null; + + return function(point) { + return { + x: x === null ? point.x : x, + y: y === null ? point.y : y, + }; + }; + } +}; + +// @todo if (fill[0] === '#') +function decodeFill(el, index, count) { + var model = el._model || {}; + var fill = model.fill; + var target; + + if (fill === undefined) { + fill = !!model.backgroundColor; + } + + if (fill === false || fill === null) { + return false; + } + + if (fill === true) { + return 'origin'; + } + + target = parseFloat(fill, 10); + if (isFinite(target) && Math.floor(target) === target) { + if (fill[0] === '-' || fill[0] === '+') { + target = index + target; + } + + if (target === index || target < 0 || target >= count) { + return false; + } + + return target; + } + + switch (fill) { + // compatibility + case 'bottom': + return 'start'; + case 'top': + return 'end'; + case 'zero': + return 'origin'; + // supported boundaries + case 'origin': + case 'start': + case 'end': + return fill; + // invalid fill values + default: + return false; + } +} + +function computeBoundary(source) { + var model = source.el._model || {}; + var scale = source.el._scale || {}; + var fill = source.fill; + var target = null; + var horizontal; + + if (isFinite(fill)) { + return null; + } + + // Backward compatibility: until v3, we still need to support boundary values set on + // the model (scaleTop, scaleBottom and scaleZero) because some external plugins and + // controllers might still use it (e.g. the Smith chart). + + if (fill === 'start') { + target = model.scaleBottom === undefined ? scale.bottom : model.scaleBottom; + } else if (fill === 'end') { + target = model.scaleTop === undefined ? scale.top : model.scaleTop; + } else if (model.scaleZero !== undefined) { + target = model.scaleZero; + } else if (scale.getBasePosition) { + target = scale.getBasePosition(); + } else if (scale.getBasePixel) { + target = scale.getBasePixel(); + } + + if (target !== undefined && target !== null) { + if (target.x !== undefined && target.y !== undefined) { + return target; + } + + if (typeof target === 'number' && isFinite(target)) { + horizontal = scale.isHorizontal(); + return { + x: horizontal ? target : null, + y: horizontal ? null : target + }; + } + } + + return null; +} + +function resolveTarget(sources, index, propagate) { + var source = sources[index]; + var fill = source.fill; + var visited = [index]; + var target; + + if (!propagate) { + return fill; + } + + while (fill !== false && visited.indexOf(fill) === -1) { + if (!isFinite(fill)) { + return fill; + } + + target = sources[fill]; + if (!target) { + return false; + } + + if (target.visible) { + return fill; + } + + visited.push(fill); + fill = target.fill; + } + + return false; +} + +function createMapper(source) { + var fill = source.fill; + var type = 'dataset'; + + if (fill === false) { + return null; + } + + if (!isFinite(fill)) { + type = 'boundary'; + } + + return mappers[type](source); +} + +function isDrawable(point) { + return point && !point.skip; +} + +function drawArea(ctx, curve0, curve1, len0, len1) { + var i; + + if (!len0 || !len1) { + return; + } + + // building first area curve (normal) + ctx.moveTo(curve0[0].x, curve0[0].y); + for (i = 1; i < len0; ++i) { + helpers.canvas.lineTo(ctx, curve0[i - 1], curve0[i]); + } + + // joining the two area curves + ctx.lineTo(curve1[len1 - 1].x, curve1[len1 - 1].y); + + // building opposite area curve (reverse) + for (i = len1 - 1; i > 0; --i) { + helpers.canvas.lineTo(ctx, curve1[i], curve1[i - 1], true); + } +} + +function doFill(ctx, points, mapper, view, color, loop) { + var count = points.length; + var span = view.spanGaps; + var curve0 = []; + var curve1 = []; + var len0 = 0; + var len1 = 0; + var i, ilen, index, p0, p1, d0, d1; + + ctx.beginPath(); + + for (i = 0, ilen = (count + !!loop); i < ilen; ++i) { + index = i % count; + p0 = points[index]._view; + p1 = mapper(p0, index, view); + d0 = isDrawable(p0); + d1 = isDrawable(p1); + + if (d0 && d1) { + len0 = curve0.push(p0); + len1 = curve1.push(p1); + } else if (len0 && len1) { + if (!span) { + drawArea(ctx, curve0, curve1, len0, len1); + len0 = len1 = 0; + curve0 = []; + curve1 = []; + } else { + if (d0) { + curve0.push(p0); + } + if (d1) { + curve1.push(p1); + } + } + } + } + + drawArea(ctx, curve0, curve1, len0, len1); + + ctx.closePath(); + ctx.fillStyle = color; + ctx.fill(); +} + +module.exports = { + id: 'filler', + + afterDatasetsUpdate: function(chart, options) { + var count = (chart.data.datasets || []).length; + var propagate = options.propagate; + var sources = []; + var meta, i, el, source; + + for (i = 0; i < count; ++i) { + meta = chart.getDatasetMeta(i); + el = meta.dataset; + source = null; + + if (el && el._model && el instanceof elements.Line) { + source = { + visible: chart.isDatasetVisible(i), + fill: decodeFill(el, i, count), + chart: chart, + el: el + }; + } + + meta.$filler = source; + sources.push(source); + } + + for (i = 0; i < count; ++i) { + source = sources[i]; + if (!source) { + continue; + } + + source.fill = resolveTarget(sources, i, propagate); + source.boundary = computeBoundary(source); + source.mapper = createMapper(source); + } + }, + + beforeDatasetDraw: function(chart, args) { + var meta = args.meta.$filler; + if (!meta) { + return; + } + + var ctx = chart.ctx; + var el = meta.el; + var view = el._view; + var points = el._children || []; + var mapper = meta.mapper; + var color = view.backgroundColor || defaults.global.defaultColor; + + if (mapper && color && points.length) { + helpers.canvas.clipArea(ctx, chart.chartArea); + doFill(ctx, points, mapper, view, color, el._loop); + helpers.canvas.unclipArea(ctx); + } + } +}; + +},{"26":26,"41":41,"46":46}],52:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var Element = require(27); +var helpers = require(46); +var layouts = require(31); + +var noop = helpers.noop; + +defaults._set('global', { + legend: { + display: true, + position: 'top', + fullWidth: true, + reverse: false, + weight: 1000, + + // a callback that will handle + onClick: function(e, legendItem) { + var index = legendItem.datasetIndex; + var ci = this.chart; + var meta = ci.getDatasetMeta(index); + + // See controller.isDatasetVisible comment + meta.hidden = meta.hidden === null ? !ci.data.datasets[index].hidden : null; + + // We hid a dataset ... rerender the chart + ci.update(); + }, + + onHover: null, + + labels: { + boxWidth: 40, + padding: 10, + // Generates labels shown in the legend + // Valid properties to return: + // text : text to display + // fillStyle : fill of coloured box + // strokeStyle: stroke of coloured box + // hidden : if this legend item refers to a hidden item + // lineCap : cap style for line + // lineDash + // lineDashOffset : + // lineJoin : + // lineWidth : + generateLabels: function(chart) { + var data = chart.data; + return helpers.isArray(data.datasets) ? data.datasets.map(function(dataset, i) { + return { + text: dataset.label, + fillStyle: (!helpers.isArray(dataset.backgroundColor) ? dataset.backgroundColor : dataset.backgroundColor[0]), + hidden: !chart.isDatasetVisible(i), + lineCap: dataset.borderCapStyle, + lineDash: dataset.borderDash, + lineDashOffset: dataset.borderDashOffset, + lineJoin: dataset.borderJoinStyle, + lineWidth: dataset.borderWidth, + strokeStyle: dataset.borderColor, + pointStyle: dataset.pointStyle, + + // Below is extra data used for toggling the datasets + datasetIndex: i + }; + }, this) : []; + } + } + }, + + legendCallback: function(chart) { + var text = []; + text.push('
      '); + for (var i = 0; i < chart.data.datasets.length; i++) { + text.push('
    • '); + if (chart.data.datasets[i].label) { + text.push(chart.data.datasets[i].label); + } + text.push('
    • '); + } + text.push('
    '); + return text.join(''); + } +}); + +/** + * Helper function to get the box width based on the usePointStyle option + * @param labelopts {Object} the label options on the legend + * @param fontSize {Number} the label font size + * @return {Number} width of the color box area + */ +function getBoxWidth(labelOpts, fontSize) { + return labelOpts.usePointStyle ? + fontSize * Math.SQRT2 : + labelOpts.boxWidth; +} + +/** + * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required! + */ +var Legend = Element.extend({ + + initialize: function(config) { + helpers.extend(this, config); + + // Contains hit boxes for each dataset (in dataset order) + this.legendHitBoxes = []; + + // Are we in doughnut mode which has a different data type + this.doughnutMode = false; + }, + + // These methods are ordered by lifecycle. Utilities then follow. + // Any function defined here is inherited by all legend types. + // Any function can be extended by the legend type + + beforeUpdate: noop, + update: function(maxWidth, maxHeight, margins) { + var me = this; + + // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;) + me.beforeUpdate(); + + // Absorb the master measurements + me.maxWidth = maxWidth; + me.maxHeight = maxHeight; + me.margins = margins; + + // Dimensions + me.beforeSetDimensions(); + me.setDimensions(); + me.afterSetDimensions(); + // Labels + me.beforeBuildLabels(); + me.buildLabels(); + me.afterBuildLabels(); + + // Fit + me.beforeFit(); + me.fit(); + me.afterFit(); + // + me.afterUpdate(); + + return me.minSize; + }, + afterUpdate: noop, + + // + + beforeSetDimensions: noop, + setDimensions: function() { + var me = this; + // Set the unconstrained dimension before label rotation + if (me.isHorizontal()) { + // Reset position before calculating rotation + me.width = me.maxWidth; + me.left = 0; + me.right = me.width; + } else { + me.height = me.maxHeight; + + // Reset position before calculating rotation + me.top = 0; + me.bottom = me.height; + } + + // Reset padding + me.paddingLeft = 0; + me.paddingTop = 0; + me.paddingRight = 0; + me.paddingBottom = 0; + + // Reset minSize + me.minSize = { + width: 0, + height: 0 + }; + }, + afterSetDimensions: noop, + + // + + beforeBuildLabels: noop, + buildLabels: function() { + var me = this; + var labelOpts = me.options.labels || {}; + var legendItems = helpers.callback(labelOpts.generateLabels, [me.chart], me) || []; + + if (labelOpts.filter) { + legendItems = legendItems.filter(function(item) { + return labelOpts.filter(item, me.chart.data); + }); + } + + if (me.options.reverse) { + legendItems.reverse(); + } + + me.legendItems = legendItems; + }, + afterBuildLabels: noop, + + // + + beforeFit: noop, + fit: function() { + var me = this; + var opts = me.options; + var labelOpts = opts.labels; + var display = opts.display; + + var ctx = me.ctx; + + var globalDefault = defaults.global; + var valueOrDefault = helpers.valueOrDefault; + var fontSize = valueOrDefault(labelOpts.fontSize, globalDefault.defaultFontSize); + var fontStyle = valueOrDefault(labelOpts.fontStyle, globalDefault.defaultFontStyle); + var fontFamily = valueOrDefault(labelOpts.fontFamily, globalDefault.defaultFontFamily); + var labelFont = helpers.fontString(fontSize, fontStyle, fontFamily); + + // Reset hit boxes + var hitboxes = me.legendHitBoxes = []; + + var minSize = me.minSize; + var isHorizontal = me.isHorizontal(); + + if (isHorizontal) { + minSize.width = me.maxWidth; // fill all the width + minSize.height = display ? 10 : 0; + } else { + minSize.width = display ? 10 : 0; + minSize.height = me.maxHeight; // fill all the height + } + + // Increase sizes here + if (display) { + ctx.font = labelFont; + + if (isHorizontal) { + // Labels + + // Width of each line of legend boxes. Labels wrap onto multiple lines when there are too many to fit on one + var lineWidths = me.lineWidths = [0]; + var totalHeight = me.legendItems.length ? fontSize + (labelOpts.padding) : 0; + + ctx.textAlign = 'left'; + ctx.textBaseline = 'top'; + + helpers.each(me.legendItems, function(legendItem, i) { + var boxWidth = getBoxWidth(labelOpts, fontSize); + var width = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width; + + if (lineWidths[lineWidths.length - 1] + width + labelOpts.padding >= me.width) { + totalHeight += fontSize + (labelOpts.padding); + lineWidths[lineWidths.length] = me.left; + } + + // Store the hitbox width and height here. Final position will be updated in `draw` + hitboxes[i] = { + left: 0, + top: 0, + width: width, + height: fontSize + }; + + lineWidths[lineWidths.length - 1] += width + labelOpts.padding; + }); + + minSize.height += totalHeight; + + } else { + var vPadding = labelOpts.padding; + var columnWidths = me.columnWidths = []; + var totalWidth = labelOpts.padding; + var currentColWidth = 0; + var currentColHeight = 0; + var itemHeight = fontSize + vPadding; + + helpers.each(me.legendItems, function(legendItem, i) { + var boxWidth = getBoxWidth(labelOpts, fontSize); + var itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width; + + // If too tall, go to new column + if (currentColHeight + itemHeight > minSize.height) { + totalWidth += currentColWidth + labelOpts.padding; + columnWidths.push(currentColWidth); // previous column width + + currentColWidth = 0; + currentColHeight = 0; + } + + // Get max width + currentColWidth = Math.max(currentColWidth, itemWidth); + currentColHeight += itemHeight; + + // Store the hitbox width and height here. Final position will be updated in `draw` + hitboxes[i] = { + left: 0, + top: 0, + width: itemWidth, + height: fontSize + }; + }); + + totalWidth += currentColWidth; + columnWidths.push(currentColWidth); + minSize.width += totalWidth; + } + } + + me.width = minSize.width; + me.height = minSize.height; + }, + afterFit: noop, + + // Shared Methods + isHorizontal: function() { + return this.options.position === 'top' || this.options.position === 'bottom'; + }, + + // Actually draw the legend on the canvas + draw: function() { + var me = this; + var opts = me.options; + var labelOpts = opts.labels; + var globalDefault = defaults.global; + var lineDefault = globalDefault.elements.line; + var legendWidth = me.width; + var lineWidths = me.lineWidths; + + if (opts.display) { + var ctx = me.ctx; + var valueOrDefault = helpers.valueOrDefault; + var fontColor = valueOrDefault(labelOpts.fontColor, globalDefault.defaultFontColor); + var fontSize = valueOrDefault(labelOpts.fontSize, globalDefault.defaultFontSize); + var fontStyle = valueOrDefault(labelOpts.fontStyle, globalDefault.defaultFontStyle); + var fontFamily = valueOrDefault(labelOpts.fontFamily, globalDefault.defaultFontFamily); + var labelFont = helpers.fontString(fontSize, fontStyle, fontFamily); + var cursor; + + // Canvas setup + ctx.textAlign = 'left'; + ctx.textBaseline = 'middle'; + ctx.lineWidth = 0.5; + ctx.strokeStyle = fontColor; // for strikethrough effect + ctx.fillStyle = fontColor; // render in correct colour + ctx.font = labelFont; + + var boxWidth = getBoxWidth(labelOpts, fontSize); + var hitboxes = me.legendHitBoxes; + + // current position + var drawLegendBox = function(x, y, legendItem) { + if (isNaN(boxWidth) || boxWidth <= 0) { + return; + } + + // Set the ctx for the box + ctx.save(); + + ctx.fillStyle = valueOrDefault(legendItem.fillStyle, globalDefault.defaultColor); + ctx.lineCap = valueOrDefault(legendItem.lineCap, lineDefault.borderCapStyle); + ctx.lineDashOffset = valueOrDefault(legendItem.lineDashOffset, lineDefault.borderDashOffset); + ctx.lineJoin = valueOrDefault(legendItem.lineJoin, lineDefault.borderJoinStyle); + ctx.lineWidth = valueOrDefault(legendItem.lineWidth, lineDefault.borderWidth); + ctx.strokeStyle = valueOrDefault(legendItem.strokeStyle, globalDefault.defaultColor); + var isLineWidthZero = (valueOrDefault(legendItem.lineWidth, lineDefault.borderWidth) === 0); + + if (ctx.setLineDash) { + // IE 9 and 10 do not support line dash + ctx.setLineDash(valueOrDefault(legendItem.lineDash, lineDefault.borderDash)); + } + + if (opts.labels && opts.labels.usePointStyle) { + // Recalculate x and y for drawPoint() because its expecting + // x and y to be center of figure (instead of top left) + var radius = fontSize * Math.SQRT2 / 2; + var offSet = radius / Math.SQRT2; + var centerX = x + offSet; + var centerY = y + offSet; + + // Draw pointStyle as legend symbol + helpers.canvas.drawPoint(ctx, legendItem.pointStyle, radius, centerX, centerY); + } else { + // Draw box as legend symbol + if (!isLineWidthZero) { + ctx.strokeRect(x, y, boxWidth, fontSize); + } + ctx.fillRect(x, y, boxWidth, fontSize); + } + + ctx.restore(); + }; + var fillText = function(x, y, legendItem, textWidth) { + var halfFontSize = fontSize / 2; + var xLeft = boxWidth + halfFontSize + x; + var yMiddle = y + halfFontSize; + + ctx.fillText(legendItem.text, xLeft, yMiddle); + + if (legendItem.hidden) { + // Strikethrough the text if hidden + ctx.beginPath(); + ctx.lineWidth = 2; + ctx.moveTo(xLeft, yMiddle); + ctx.lineTo(xLeft + textWidth, yMiddle); + ctx.stroke(); + } + }; + + // Horizontal + var isHorizontal = me.isHorizontal(); + if (isHorizontal) { + cursor = { + x: me.left + ((legendWidth - lineWidths[0]) / 2), + y: me.top + labelOpts.padding, + line: 0 + }; + } else { + cursor = { + x: me.left + labelOpts.padding, + y: me.top + labelOpts.padding, + line: 0 + }; + } + + var itemHeight = fontSize + labelOpts.padding; + helpers.each(me.legendItems, function(legendItem, i) { + var textWidth = ctx.measureText(legendItem.text).width; + var width = boxWidth + (fontSize / 2) + textWidth; + var x = cursor.x; + var y = cursor.y; + + if (isHorizontal) { + if (x + width >= legendWidth) { + y = cursor.y += itemHeight; + cursor.line++; + x = cursor.x = me.left + ((legendWidth - lineWidths[cursor.line]) / 2); + } + } else if (y + itemHeight > me.bottom) { + x = cursor.x = x + me.columnWidths[cursor.line] + labelOpts.padding; + y = cursor.y = me.top + labelOpts.padding; + cursor.line++; + } + + drawLegendBox(x, y, legendItem); + + hitboxes[i].left = x; + hitboxes[i].top = y; + + // Fill the actual label + fillText(x, y, legendItem, textWidth); + + if (isHorizontal) { + cursor.x += width + (labelOpts.padding); + } else { + cursor.y += itemHeight; + } + + }); + } + }, + + /** + * Handle an event + * @private + * @param {IEvent} event - The event to handle + * @return {Boolean} true if a change occured + */ + handleEvent: function(e) { + var me = this; + var opts = me.options; + var type = e.type === 'mouseup' ? 'click' : e.type; + var changed = false; + + if (type === 'mousemove') { + if (!opts.onHover) { + return; + } + } else if (type === 'click') { + if (!opts.onClick) { + return; + } + } else { + return; + } + + // Chart event already has relative position in it + var x = e.x; + var y = e.y; + + if (x >= me.left && x <= me.right && y >= me.top && y <= me.bottom) { + // See if we are touching one of the dataset boxes + var lh = me.legendHitBoxes; + for (var i = 0; i < lh.length; ++i) { + var hitBox = lh[i]; + + if (x >= hitBox.left && x <= hitBox.left + hitBox.width && y >= hitBox.top && y <= hitBox.top + hitBox.height) { + // Touching an element + if (type === 'click') { + // use e.native for backwards compatibility + opts.onClick.call(me, e.native, me.legendItems[i]); + changed = true; + break; + } else if (type === 'mousemove') { + // use e.native for backwards compatibility + opts.onHover.call(me, e.native, me.legendItems[i]); + changed = true; + break; + } + } + } + } + + return changed; + } +}); + +function createNewLegendAndAttach(chart, legendOpts) { + var legend = new Legend({ + ctx: chart.ctx, + options: legendOpts, + chart: chart + }); + + layouts.configure(chart, legend, legendOpts); + layouts.addBox(chart, legend); + chart.legend = legend; +} + +module.exports = { + id: 'legend', + + /** + * Backward compatibility: since 2.1.5, the legend is registered as a plugin, making + * Chart.Legend obsolete. To avoid a breaking change, we export the Legend as part of + * the plugin, which one will be re-exposed in the chart.js file. + * https://github.com/chartjs/Chart.js/pull/2640 + * @private + */ + _element: Legend, + + beforeInit: function(chart) { + var legendOpts = chart.options.legend; + + if (legendOpts) { + createNewLegendAndAttach(chart, legendOpts); + } + }, + + beforeUpdate: function(chart) { + var legendOpts = chart.options.legend; + var legend = chart.legend; + + if (legendOpts) { + helpers.mergeIf(legendOpts, defaults.global.legend); + + if (legend) { + layouts.configure(chart, legend, legendOpts); + legend.options = legendOpts; + } else { + createNewLegendAndAttach(chart, legendOpts); + } + } else if (legend) { + layouts.removeBox(chart, legend); + delete chart.legend; + } + }, + + afterEvent: function(chart, e) { + var legend = chart.legend; + if (legend) { + legend.handleEvent(e); + } + } +}; + +},{"26":26,"27":27,"31":31,"46":46}],53:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var Element = require(27); +var helpers = require(46); +var layouts = require(31); + +var noop = helpers.noop; + +defaults._set('global', { + title: { + display: false, + fontStyle: 'bold', + fullWidth: true, + lineHeight: 1.2, + padding: 10, + position: 'top', + text: '', + weight: 2000 // by default greater than legend (1000) to be above + } +}); + +/** + * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required! + */ +var Title = Element.extend({ + initialize: function(config) { + var me = this; + helpers.extend(me, config); + + // Contains hit boxes for each dataset (in dataset order) + me.legendHitBoxes = []; + }, + + // These methods are ordered by lifecycle. Utilities then follow. + + beforeUpdate: noop, + update: function(maxWidth, maxHeight, margins) { + var me = this; + + // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;) + me.beforeUpdate(); + + // Absorb the master measurements + me.maxWidth = maxWidth; + me.maxHeight = maxHeight; + me.margins = margins; + + // Dimensions + me.beforeSetDimensions(); + me.setDimensions(); + me.afterSetDimensions(); + // Labels + me.beforeBuildLabels(); + me.buildLabels(); + me.afterBuildLabels(); + + // Fit + me.beforeFit(); + me.fit(); + me.afterFit(); + // + me.afterUpdate(); + + return me.minSize; + + }, + afterUpdate: noop, + + // + + beforeSetDimensions: noop, + setDimensions: function() { + var me = this; + // Set the unconstrained dimension before label rotation + if (me.isHorizontal()) { + // Reset position before calculating rotation + me.width = me.maxWidth; + me.left = 0; + me.right = me.width; + } else { + me.height = me.maxHeight; + + // Reset position before calculating rotation + me.top = 0; + me.bottom = me.height; + } + + // Reset padding + me.paddingLeft = 0; + me.paddingTop = 0; + me.paddingRight = 0; + me.paddingBottom = 0; + + // Reset minSize + me.minSize = { + width: 0, + height: 0 + }; + }, + afterSetDimensions: noop, + + // + + beforeBuildLabels: noop, + buildLabels: noop, + afterBuildLabels: noop, + + // + + beforeFit: noop, + fit: function() { + var me = this; + var valueOrDefault = helpers.valueOrDefault; + var opts = me.options; + var display = opts.display; + var fontSize = valueOrDefault(opts.fontSize, defaults.global.defaultFontSize); + var minSize = me.minSize; + var lineCount = helpers.isArray(opts.text) ? opts.text.length : 1; + var lineHeight = helpers.options.toLineHeight(opts.lineHeight, fontSize); + var textSize = display ? (lineCount * lineHeight) + (opts.padding * 2) : 0; + + if (me.isHorizontal()) { + minSize.width = me.maxWidth; // fill all the width + minSize.height = textSize; + } else { + minSize.width = textSize; + minSize.height = me.maxHeight; // fill all the height + } + + me.width = minSize.width; + me.height = minSize.height; + + }, + afterFit: noop, + + // Shared Methods + isHorizontal: function() { + var pos = this.options.position; + return pos === 'top' || pos === 'bottom'; + }, + + // Actually draw the title block on the canvas + draw: function() { + var me = this; + var ctx = me.ctx; + var valueOrDefault = helpers.valueOrDefault; + var opts = me.options; + var globalDefaults = defaults.global; + + if (opts.display) { + var fontSize = valueOrDefault(opts.fontSize, globalDefaults.defaultFontSize); + var fontStyle = valueOrDefault(opts.fontStyle, globalDefaults.defaultFontStyle); + var fontFamily = valueOrDefault(opts.fontFamily, globalDefaults.defaultFontFamily); + var titleFont = helpers.fontString(fontSize, fontStyle, fontFamily); + var lineHeight = helpers.options.toLineHeight(opts.lineHeight, fontSize); + var offset = lineHeight / 2 + opts.padding; + var rotation = 0; + var top = me.top; + var left = me.left; + var bottom = me.bottom; + var right = me.right; + var maxWidth, titleX, titleY; + + ctx.fillStyle = valueOrDefault(opts.fontColor, globalDefaults.defaultFontColor); // render in correct colour + ctx.font = titleFont; + + // Horizontal + if (me.isHorizontal()) { + titleX = left + ((right - left) / 2); // midpoint of the width + titleY = top + offset; + maxWidth = right - left; + } else { + titleX = opts.position === 'left' ? left + offset : right - offset; + titleY = top + ((bottom - top) / 2); + maxWidth = bottom - top; + rotation = Math.PI * (opts.position === 'left' ? -0.5 : 0.5); + } + + ctx.save(); + ctx.translate(titleX, titleY); + ctx.rotate(rotation); + ctx.textAlign = 'center'; + ctx.textBaseline = 'middle'; + + var text = opts.text; + if (helpers.isArray(text)) { + var y = 0; + for (var i = 0; i < text.length; ++i) { + ctx.fillText(text[i], 0, y, maxWidth); + y += lineHeight; + } + } else { + ctx.fillText(text, 0, 0, maxWidth); + } + + ctx.restore(); + } + } +}); + +function createNewTitleBlockAndAttach(chart, titleOpts) { + var title = new Title({ + ctx: chart.ctx, + options: titleOpts, + chart: chart + }); + + layouts.configure(chart, title, titleOpts); + layouts.addBox(chart, title); + chart.titleBlock = title; +} + +module.exports = { + id: 'title', + + /** + * Backward compatibility: since 2.1.5, the title is registered as a plugin, making + * Chart.Title obsolete. To avoid a breaking change, we export the Title as part of + * the plugin, which one will be re-exposed in the chart.js file. + * https://github.com/chartjs/Chart.js/pull/2640 + * @private + */ + _element: Title, + + beforeInit: function(chart) { + var titleOpts = chart.options.title; + + if (titleOpts) { + createNewTitleBlockAndAttach(chart, titleOpts); + } + }, + + beforeUpdate: function(chart) { + var titleOpts = chart.options.title; + var titleBlock = chart.titleBlock; + + if (titleOpts) { + helpers.mergeIf(titleOpts, defaults.global.title); + + if (titleBlock) { + layouts.configure(chart, titleBlock, titleOpts); + titleBlock.options = titleOpts; + } else { + createNewTitleBlockAndAttach(chart, titleOpts); + } + } else if (titleBlock) { + layouts.removeBox(chart, titleBlock); + delete chart.titleBlock; + } + } +}; + +},{"26":26,"27":27,"31":31,"46":46}],54:[function(require,module,exports){ +'use strict'; + +var Scale = require(33); +var scaleService = require(34); + +module.exports = function() { + + // Default config for a category scale + var defaultConfig = { + position: 'bottom' + }; + + var DatasetScale = Scale.extend({ + /** + * Internal function to get the correct labels. If data.xLabels or data.yLabels are defined, use those + * else fall back to data.labels + * @private + */ + getLabels: function() { + var data = this.chart.data; + return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels; + }, + + determineDataLimits: function() { + var me = this; + var labels = me.getLabels(); + me.minIndex = 0; + me.maxIndex = labels.length - 1; + var findIndex; + + if (me.options.ticks.min !== undefined) { + // user specified min value + findIndex = labels.indexOf(me.options.ticks.min); + me.minIndex = findIndex !== -1 ? findIndex : me.minIndex; + } + + if (me.options.ticks.max !== undefined) { + // user specified max value + findIndex = labels.indexOf(me.options.ticks.max); + me.maxIndex = findIndex !== -1 ? findIndex : me.maxIndex; + } + + me.min = labels[me.minIndex]; + me.max = labels[me.maxIndex]; + }, + + buildTicks: function() { + var me = this; + var labels = me.getLabels(); + // If we are viewing some subset of labels, slice the original array + me.ticks = (me.minIndex === 0 && me.maxIndex === labels.length - 1) ? labels : labels.slice(me.minIndex, me.maxIndex + 1); + }, + + getLabelForIndex: function(index, datasetIndex) { + var me = this; + var data = me.chart.data; + var isHorizontal = me.isHorizontal(); + + if (data.yLabels && !isHorizontal) { + return me.getRightValue(data.datasets[datasetIndex].data[index]); + } + return me.ticks[index - me.minIndex]; + }, + + // Used to get data value locations. Value can either be an index or a numerical value + getPixelForValue: function(value, index) { + var me = this; + var offset = me.options.offset; + // 1 is added because we need the length but we have the indexes + var offsetAmt = Math.max((me.maxIndex + 1 - me.minIndex - (offset ? 0 : 1)), 1); + + // If value is a data object, then index is the index in the data array, + // not the index of the scale. We need to change that. + var valueCategory; + if (value !== undefined && value !== null) { + valueCategory = me.isHorizontal() ? value.x : value.y; + } + if (valueCategory !== undefined || (value !== undefined && isNaN(index))) { + var labels = me.getLabels(); + value = valueCategory || value; + var idx = labels.indexOf(value); + index = idx !== -1 ? idx : index; + } + + if (me.isHorizontal()) { + var valueWidth = me.width / offsetAmt; + var widthOffset = (valueWidth * (index - me.minIndex)); + + if (offset) { + widthOffset += (valueWidth / 2); + } + + return me.left + Math.round(widthOffset); + } + var valueHeight = me.height / offsetAmt; + var heightOffset = (valueHeight * (index - me.minIndex)); + + if (offset) { + heightOffset += (valueHeight / 2); + } + + return me.top + Math.round(heightOffset); + }, + getPixelForTick: function(index) { + return this.getPixelForValue(this.ticks[index], index + this.minIndex, null); + }, + getValueForPixel: function(pixel) { + var me = this; + var offset = me.options.offset; + var value; + var offsetAmt = Math.max((me._ticks.length - (offset ? 0 : 1)), 1); + var horz = me.isHorizontal(); + var valueDimension = (horz ? me.width : me.height) / offsetAmt; + + pixel -= horz ? me.left : me.top; + + if (offset) { + pixel -= (valueDimension / 2); + } + + if (pixel <= 0) { + value = 0; + } else { + value = Math.round(pixel / valueDimension); + } + + return value + me.minIndex; + }, + getBasePixel: function() { + return this.bottom; + } + }); + + scaleService.registerScaleType('category', DatasetScale, defaultConfig); +}; + +},{"33":33,"34":34}],55:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var helpers = require(46); +var scaleService = require(34); +var Ticks = require(35); + +module.exports = function(Chart) { + + var defaultConfig = { + position: 'left', + ticks: { + callback: Ticks.formatters.linear + } + }; + + var LinearScale = Chart.LinearScaleBase.extend({ + + determineDataLimits: function() { + var me = this; + var opts = me.options; + var chart = me.chart; + var data = chart.data; + var datasets = data.datasets; + var isHorizontal = me.isHorizontal(); + var DEFAULT_MIN = 0; + var DEFAULT_MAX = 1; + + function IDMatches(meta) { + return isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id; + } + + // First Calculate the range + me.min = null; + me.max = null; + + var hasStacks = opts.stacked; + if (hasStacks === undefined) { + helpers.each(datasets, function(dataset, datasetIndex) { + if (hasStacks) { + return; + } + + var meta = chart.getDatasetMeta(datasetIndex); + if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta) && + meta.stack !== undefined) { + hasStacks = true; + } + }); + } + + if (opts.stacked || hasStacks) { + var valuesPerStack = {}; + + helpers.each(datasets, function(dataset, datasetIndex) { + var meta = chart.getDatasetMeta(datasetIndex); + var key = [ + meta.type, + // we have a separate stack for stack=undefined datasets when the opts.stacked is undefined + ((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''), + meta.stack + ].join('.'); + + if (valuesPerStack[key] === undefined) { + valuesPerStack[key] = { + positiveValues: [], + negativeValues: [] + }; + } + + // Store these per type + var positiveValues = valuesPerStack[key].positiveValues; + var negativeValues = valuesPerStack[key].negativeValues; + + if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) { + helpers.each(dataset.data, function(rawValue, index) { + var value = +me.getRightValue(rawValue); + if (isNaN(value) || meta.data[index].hidden) { + return; + } + + positiveValues[index] = positiveValues[index] || 0; + negativeValues[index] = negativeValues[index] || 0; + + if (opts.relativePoints) { + positiveValues[index] = 100; + } else if (value < 0) { + negativeValues[index] += value; + } else { + positiveValues[index] += value; + } + }); + } + }); + + helpers.each(valuesPerStack, function(valuesForType) { + var values = valuesForType.positiveValues.concat(valuesForType.negativeValues); + var minVal = helpers.min(values); + var maxVal = helpers.max(values); + me.min = me.min === null ? minVal : Math.min(me.min, minVal); + me.max = me.max === null ? maxVal : Math.max(me.max, maxVal); + }); + + } else { + helpers.each(datasets, function(dataset, datasetIndex) { + var meta = chart.getDatasetMeta(datasetIndex); + if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) { + helpers.each(dataset.data, function(rawValue, index) { + var value = +me.getRightValue(rawValue); + if (isNaN(value) || meta.data[index].hidden) { + return; + } + + if (me.min === null) { + me.min = value; + } else if (value < me.min) { + me.min = value; + } + + if (me.max === null) { + me.max = value; + } else if (value > me.max) { + me.max = value; + } + }); + } + }); + } + + me.min = isFinite(me.min) && !isNaN(me.min) ? me.min : DEFAULT_MIN; + me.max = isFinite(me.max) && !isNaN(me.max) ? me.max : DEFAULT_MAX; + + // Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero + this.handleTickRangeOptions(); + }, + getTickLimit: function() { + var maxTicks; + var me = this; + var tickOpts = me.options.ticks; + + if (me.isHorizontal()) { + maxTicks = Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(me.width / 50)); + } else { + // The factor of 2 used to scale the font size has been experimentally determined. + var tickFontSize = helpers.valueOrDefault(tickOpts.fontSize, defaults.global.defaultFontSize); + maxTicks = Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(me.height / (2 * tickFontSize))); + } + + return maxTicks; + }, + // Called after the ticks are built. We need + handleDirectionalChanges: function() { + if (!this.isHorizontal()) { + // We are in a vertical orientation. The top value is the highest. So reverse the array + this.ticks.reverse(); + } + }, + getLabelForIndex: function(index, datasetIndex) { + return +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]); + }, + // Utils + getPixelForValue: function(value) { + // This must be called after fit has been run so that + // this.left, this.top, this.right, and this.bottom have been defined + var me = this; + var start = me.start; + + var rightValue = +me.getRightValue(value); + var pixel; + var range = me.end - start; + + if (me.isHorizontal()) { + pixel = me.left + (me.width / range * (rightValue - start)); + } else { + pixel = me.bottom - (me.height / range * (rightValue - start)); + } + return pixel; + }, + getValueForPixel: function(pixel) { + var me = this; + var isHorizontal = me.isHorizontal(); + var innerDimension = isHorizontal ? me.width : me.height; + var offset = (isHorizontal ? pixel - me.left : me.bottom - pixel) / innerDimension; + return me.start + ((me.end - me.start) * offset); + }, + getPixelForTick: function(index) { + return this.getPixelForValue(this.ticksAsNumbers[index]); + } + }); + + scaleService.registerScaleType('linear', LinearScale, defaultConfig); +}; + +},{"26":26,"34":34,"35":35,"46":46}],56:[function(require,module,exports){ +'use strict'; + +var helpers = require(46); +var Scale = require(33); + +/** + * Generate a set of linear ticks + * @param generationOptions the options used to generate the ticks + * @param dataRange the range of the data + * @returns {Array} array of tick values + */ +function generateTicks(generationOptions, dataRange) { + var ticks = []; + // To get a "nice" value for the tick spacing, we will use the appropriately named + // "nice number" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks + // for details. + + var factor; + var precision; + var spacing; + + if (generationOptions.stepSize && generationOptions.stepSize > 0) { + spacing = generationOptions.stepSize; + } else { + var niceRange = helpers.niceNum(dataRange.max - dataRange.min, false); + spacing = helpers.niceNum(niceRange / (generationOptions.maxTicks - 1), true); + + precision = generationOptions.precision; + if (precision !== undefined) { + // If the user specified a precision, round to that number of decimal places + factor = Math.pow(10, precision); + spacing = Math.ceil(spacing * factor) / factor; + } + } + var niceMin = Math.floor(dataRange.min / spacing) * spacing; + var niceMax = Math.ceil(dataRange.max / spacing) * spacing; + + // If min, max and stepSize is set and they make an evenly spaced scale use it. + if (!helpers.isNullOrUndef(generationOptions.min) && !helpers.isNullOrUndef(generationOptions.max) && generationOptions.stepSize) { + // If very close to our whole number, use it. + if (helpers.almostWhole((generationOptions.max - generationOptions.min) / generationOptions.stepSize, spacing / 1000)) { + niceMin = generationOptions.min; + niceMax = generationOptions.max; + } + } + + var numSpaces = (niceMax - niceMin) / spacing; + // If very close to our rounded value, use it. + if (helpers.almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) { + numSpaces = Math.round(numSpaces); + } else { + numSpaces = Math.ceil(numSpaces); + } + + precision = 1; + if (spacing < 1) { + precision = Math.pow(10, 1 - Math.floor(helpers.log10(spacing))); + niceMin = Math.round(niceMin * precision) / precision; + niceMax = Math.round(niceMax * precision) / precision; + } + ticks.push(generationOptions.min !== undefined ? generationOptions.min : niceMin); + for (var j = 1; j < numSpaces; ++j) { + ticks.push(Math.round((niceMin + j * spacing) * precision) / precision); + } + ticks.push(generationOptions.max !== undefined ? generationOptions.max : niceMax); + + return ticks; +} + +module.exports = function(Chart) { + + var noop = helpers.noop; + + Chart.LinearScaleBase = Scale.extend({ + getRightValue: function(value) { + if (typeof value === 'string') { + return +value; + } + return Scale.prototype.getRightValue.call(this, value); + }, + + handleTickRangeOptions: function() { + var me = this; + var opts = me.options; + var tickOpts = opts.ticks; + + // If we are forcing it to begin at 0, but 0 will already be rendered on the chart, + // do nothing since that would make the chart weird. If the user really wants a weird chart + // axis, they can manually override it + if (tickOpts.beginAtZero) { + var minSign = helpers.sign(me.min); + var maxSign = helpers.sign(me.max); + + if (minSign < 0 && maxSign < 0) { + // move the top up to 0 + me.max = 0; + } else if (minSign > 0 && maxSign > 0) { + // move the bottom down to 0 + me.min = 0; + } + } + + var setMin = tickOpts.min !== undefined || tickOpts.suggestedMin !== undefined; + var setMax = tickOpts.max !== undefined || tickOpts.suggestedMax !== undefined; + + if (tickOpts.min !== undefined) { + me.min = tickOpts.min; + } else if (tickOpts.suggestedMin !== undefined) { + if (me.min === null) { + me.min = tickOpts.suggestedMin; + } else { + me.min = Math.min(me.min, tickOpts.suggestedMin); + } + } + + if (tickOpts.max !== undefined) { + me.max = tickOpts.max; + } else if (tickOpts.suggestedMax !== undefined) { + if (me.max === null) { + me.max = tickOpts.suggestedMax; + } else { + me.max = Math.max(me.max, tickOpts.suggestedMax); + } + } + + if (setMin !== setMax) { + // We set the min or the max but not both. + // So ensure that our range is good + // Inverted or 0 length range can happen when + // ticks.min is set, and no datasets are visible + if (me.min >= me.max) { + if (setMin) { + me.max = me.min + 1; + } else { + me.min = me.max - 1; + } + } + } + + if (me.min === me.max) { + me.max++; + + if (!tickOpts.beginAtZero) { + me.min--; + } + } + }, + getTickLimit: noop, + handleDirectionalChanges: noop, + + buildTicks: function() { + var me = this; + var opts = me.options; + var tickOpts = opts.ticks; + + // Figure out what the max number of ticks we can support it is based on the size of + // the axis area. For now, we say that the minimum tick spacing in pixels must be 50 + // We also limit the maximum number of ticks to 11 which gives a nice 10 squares on + // the graph. Make sure we always have at least 2 ticks + var maxTicks = me.getTickLimit(); + maxTicks = Math.max(2, maxTicks); + + var numericGeneratorOptions = { + maxTicks: maxTicks, + min: tickOpts.min, + max: tickOpts.max, + precision: tickOpts.precision, + stepSize: helpers.valueOrDefault(tickOpts.fixedStepSize, tickOpts.stepSize) + }; + var ticks = me.ticks = generateTicks(numericGeneratorOptions, me); + + me.handleDirectionalChanges(); + + // At this point, we need to update our max and min given the tick values since we have expanded the + // range of the scale + me.max = helpers.max(ticks); + me.min = helpers.min(ticks); + + if (tickOpts.reverse) { + ticks.reverse(); + + me.start = me.max; + me.end = me.min; + } else { + me.start = me.min; + me.end = me.max; + } + }, + convertTicksToLabels: function() { + var me = this; + me.ticksAsNumbers = me.ticks.slice(); + me.zeroLineIndex = me.ticks.indexOf(0); + + Scale.prototype.convertTicksToLabels.call(me); + } + }); +}; + +},{"33":33,"46":46}],57:[function(require,module,exports){ +'use strict'; + +var helpers = require(46); +var Scale = require(33); +var scaleService = require(34); +var Ticks = require(35); + +/** + * Generate a set of logarithmic ticks + * @param generationOptions the options used to generate the ticks + * @param dataRange the range of the data + * @returns {Array} array of tick values + */ +function generateTicks(generationOptions, dataRange) { + var ticks = []; + var valueOrDefault = helpers.valueOrDefault; + + // Figure out what the max number of ticks we can support it is based on the size of + // the axis area. For now, we say that the minimum tick spacing in pixels must be 50 + // We also limit the maximum number of ticks to 11 which gives a nice 10 squares on + // the graph + var tickVal = valueOrDefault(generationOptions.min, Math.pow(10, Math.floor(helpers.log10(dataRange.min)))); + + var endExp = Math.floor(helpers.log10(dataRange.max)); + var endSignificand = Math.ceil(dataRange.max / Math.pow(10, endExp)); + var exp, significand; + + if (tickVal === 0) { + exp = Math.floor(helpers.log10(dataRange.minNotZero)); + significand = Math.floor(dataRange.minNotZero / Math.pow(10, exp)); + + ticks.push(tickVal); + tickVal = significand * Math.pow(10, exp); + } else { + exp = Math.floor(helpers.log10(tickVal)); + significand = Math.floor(tickVal / Math.pow(10, exp)); + } + var precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1; + + do { + ticks.push(tickVal); + + ++significand; + if (significand === 10) { + significand = 1; + ++exp; + precision = exp >= 0 ? 1 : precision; + } + + tickVal = Math.round(significand * Math.pow(10, exp) * precision) / precision; + } while (exp < endExp || (exp === endExp && significand < endSignificand)); + + var lastTick = valueOrDefault(generationOptions.max, tickVal); + ticks.push(lastTick); + + return ticks; +} + + +module.exports = function(Chart) { + + var defaultConfig = { + position: 'left', + + // label settings + ticks: { + callback: Ticks.formatters.logarithmic + } + }; + + var LogarithmicScale = Scale.extend({ + determineDataLimits: function() { + var me = this; + var opts = me.options; + var chart = me.chart; + var data = chart.data; + var datasets = data.datasets; + var isHorizontal = me.isHorizontal(); + function IDMatches(meta) { + return isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id; + } + + // Calculate Range + me.min = null; + me.max = null; + me.minNotZero = null; + + var hasStacks = opts.stacked; + if (hasStacks === undefined) { + helpers.each(datasets, function(dataset, datasetIndex) { + if (hasStacks) { + return; + } + + var meta = chart.getDatasetMeta(datasetIndex); + if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta) && + meta.stack !== undefined) { + hasStacks = true; + } + }); + } + + if (opts.stacked || hasStacks) { + var valuesPerStack = {}; + + helpers.each(datasets, function(dataset, datasetIndex) { + var meta = chart.getDatasetMeta(datasetIndex); + var key = [ + meta.type, + // we have a separate stack for stack=undefined datasets when the opts.stacked is undefined + ((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''), + meta.stack + ].join('.'); + + if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) { + if (valuesPerStack[key] === undefined) { + valuesPerStack[key] = []; + } + + helpers.each(dataset.data, function(rawValue, index) { + var values = valuesPerStack[key]; + var value = +me.getRightValue(rawValue); + // invalid, hidden and negative values are ignored + if (isNaN(value) || meta.data[index].hidden || value < 0) { + return; + } + values[index] = values[index] || 0; + values[index] += value; + }); + } + }); + + helpers.each(valuesPerStack, function(valuesForType) { + if (valuesForType.length > 0) { + var minVal = helpers.min(valuesForType); + var maxVal = helpers.max(valuesForType); + me.min = me.min === null ? minVal : Math.min(me.min, minVal); + me.max = me.max === null ? maxVal : Math.max(me.max, maxVal); + } + }); + + } else { + helpers.each(datasets, function(dataset, datasetIndex) { + var meta = chart.getDatasetMeta(datasetIndex); + if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) { + helpers.each(dataset.data, function(rawValue, index) { + var value = +me.getRightValue(rawValue); + // invalid, hidden and negative values are ignored + if (isNaN(value) || meta.data[index].hidden || value < 0) { + return; + } + + if (me.min === null) { + me.min = value; + } else if (value < me.min) { + me.min = value; + } + + if (me.max === null) { + me.max = value; + } else if (value > me.max) { + me.max = value; + } + + if (value !== 0 && (me.minNotZero === null || value < me.minNotZero)) { + me.minNotZero = value; + } + }); + } + }); + } + + // Common base implementation to handle ticks.min, ticks.max + this.handleTickRangeOptions(); + }, + handleTickRangeOptions: function() { + var me = this; + var opts = me.options; + var tickOpts = opts.ticks; + var valueOrDefault = helpers.valueOrDefault; + var DEFAULT_MIN = 1; + var DEFAULT_MAX = 10; + + me.min = valueOrDefault(tickOpts.min, me.min); + me.max = valueOrDefault(tickOpts.max, me.max); + + if (me.min === me.max) { + if (me.min !== 0 && me.min !== null) { + me.min = Math.pow(10, Math.floor(helpers.log10(me.min)) - 1); + me.max = Math.pow(10, Math.floor(helpers.log10(me.max)) + 1); + } else { + me.min = DEFAULT_MIN; + me.max = DEFAULT_MAX; + } + } + if (me.min === null) { + me.min = Math.pow(10, Math.floor(helpers.log10(me.max)) - 1); + } + if (me.max === null) { + me.max = me.min !== 0 + ? Math.pow(10, Math.floor(helpers.log10(me.min)) + 1) + : DEFAULT_MAX; + } + if (me.minNotZero === null) { + if (me.min > 0) { + me.minNotZero = me.min; + } else if (me.max < 1) { + me.minNotZero = Math.pow(10, Math.floor(helpers.log10(me.max))); + } else { + me.minNotZero = DEFAULT_MIN; + } + } + }, + buildTicks: function() { + var me = this; + var opts = me.options; + var tickOpts = opts.ticks; + var reverse = !me.isHorizontal(); + + var generationOptions = { + min: tickOpts.min, + max: tickOpts.max + }; + var ticks = me.ticks = generateTicks(generationOptions, me); + + // At this point, we need to update our max and min given the tick values since we have expanded the + // range of the scale + me.max = helpers.max(ticks); + me.min = helpers.min(ticks); + + if (tickOpts.reverse) { + reverse = !reverse; + me.start = me.max; + me.end = me.min; + } else { + me.start = me.min; + me.end = me.max; + } + if (reverse) { + ticks.reverse(); + } + }, + convertTicksToLabels: function() { + this.tickValues = this.ticks.slice(); + + Scale.prototype.convertTicksToLabels.call(this); + }, + // Get the correct tooltip label + getLabelForIndex: function(index, datasetIndex) { + return +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]); + }, + getPixelForTick: function(index) { + return this.getPixelForValue(this.tickValues[index]); + }, + /** + * Returns the value of the first tick. + * @param {Number} value - The minimum not zero value. + * @return {Number} The first tick value. + * @private + */ + _getFirstTickValue: function(value) { + var exp = Math.floor(helpers.log10(value)); + var significand = Math.floor(value / Math.pow(10, exp)); + + return significand * Math.pow(10, exp); + }, + getPixelForValue: function(value) { + var me = this; + var reverse = me.options.ticks.reverse; + var log10 = helpers.log10; + var firstTickValue = me._getFirstTickValue(me.minNotZero); + var offset = 0; + var innerDimension, pixel, start, end, sign; + + value = +me.getRightValue(value); + if (reverse) { + start = me.end; + end = me.start; + sign = -1; + } else { + start = me.start; + end = me.end; + sign = 1; + } + if (me.isHorizontal()) { + innerDimension = me.width; + pixel = reverse ? me.right : me.left; + } else { + innerDimension = me.height; + sign *= -1; // invert, since the upper-left corner of the canvas is at pixel (0, 0) + pixel = reverse ? me.top : me.bottom; + } + if (value !== start) { + if (start === 0) { // include zero tick + offset = helpers.getValueOrDefault( + me.options.ticks.fontSize, + Chart.defaults.global.defaultFontSize + ); + innerDimension -= offset; + start = firstTickValue; + } + if (value !== 0) { + offset += innerDimension / (log10(end) - log10(start)) * (log10(value) - log10(start)); + } + pixel += sign * offset; + } + return pixel; + }, + getValueForPixel: function(pixel) { + var me = this; + var reverse = me.options.ticks.reverse; + var log10 = helpers.log10; + var firstTickValue = me._getFirstTickValue(me.minNotZero); + var innerDimension, start, end, value; + + if (reverse) { + start = me.end; + end = me.start; + } else { + start = me.start; + end = me.end; + } + if (me.isHorizontal()) { + innerDimension = me.width; + value = reverse ? me.right - pixel : pixel - me.left; + } else { + innerDimension = me.height; + value = reverse ? pixel - me.top : me.bottom - pixel; + } + if (value !== start) { + if (start === 0) { // include zero tick + var offset = helpers.getValueOrDefault( + me.options.ticks.fontSize, + Chart.defaults.global.defaultFontSize + ); + value -= offset; + innerDimension -= offset; + start = firstTickValue; + } + value *= log10(end) - log10(start); + value /= innerDimension; + value = Math.pow(10, log10(start) + value); + } + return value; + } + }); + + scaleService.registerScaleType('logarithmic', LogarithmicScale, defaultConfig); +}; + +},{"33":33,"34":34,"35":35,"46":46}],58:[function(require,module,exports){ +'use strict'; + +var defaults = require(26); +var helpers = require(46); +var scaleService = require(34); +var Ticks = require(35); + +module.exports = function(Chart) { + + var globalDefaults = defaults.global; + + var defaultConfig = { + display: true, + + // Boolean - Whether to animate scaling the chart from the centre + animate: true, + position: 'chartArea', + + angleLines: { + display: true, + color: 'rgba(0, 0, 0, 0.1)', + lineWidth: 1 + }, + + gridLines: { + circular: false + }, + + // label settings + ticks: { + // Boolean - Show a backdrop to the scale label + showLabelBackdrop: true, + + // String - The colour of the label backdrop + backdropColor: 'rgba(255,255,255,0.75)', + + // Number - The backdrop padding above & below the label in pixels + backdropPaddingY: 2, + + // Number - The backdrop padding to the side of the label in pixels + backdropPaddingX: 2, + + callback: Ticks.formatters.linear + }, + + pointLabels: { + // Boolean - if true, show point labels + display: true, + + // Number - Point label font size in pixels + fontSize: 10, + + // Function - Used to convert point labels + callback: function(label) { + return label; + } + } + }; + + function getValueCount(scale) { + var opts = scale.options; + return opts.angleLines.display || opts.pointLabels.display ? scale.chart.data.labels.length : 0; + } + + function getPointLabelFontOptions(scale) { + var pointLabelOptions = scale.options.pointLabels; + var fontSize = helpers.valueOrDefault(pointLabelOptions.fontSize, globalDefaults.defaultFontSize); + var fontStyle = helpers.valueOrDefault(pointLabelOptions.fontStyle, globalDefaults.defaultFontStyle); + var fontFamily = helpers.valueOrDefault(pointLabelOptions.fontFamily, globalDefaults.defaultFontFamily); + var font = helpers.fontString(fontSize, fontStyle, fontFamily); + + return { + size: fontSize, + style: fontStyle, + family: fontFamily, + font: font + }; + } + + function measureLabelSize(ctx, fontSize, label) { + if (helpers.isArray(label)) { + return { + w: helpers.longestText(ctx, ctx.font, label), + h: (label.length * fontSize) + ((label.length - 1) * 1.5 * fontSize) + }; + } + + return { + w: ctx.measureText(label).width, + h: fontSize + }; + } + + function determineLimits(angle, pos, size, min, max) { + if (angle === min || angle === max) { + return { + start: pos - (size / 2), + end: pos + (size / 2) + }; + } else if (angle < min || angle > max) { + return { + start: pos - size - 5, + end: pos + }; + } + + return { + start: pos, + end: pos + size + 5 + }; + } + + /** + * Helper function to fit a radial linear scale with point labels + */ + function fitWithPointLabels(scale) { + /* + * Right, this is really confusing and there is a lot of maths going on here + * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9 + * + * Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif + * + * Solution: + * + * We assume the radius of the polygon is half the size of the canvas at first + * at each index we check if the text overlaps. + * + * Where it does, we store that angle and that index. + * + * After finding the largest index and angle we calculate how much we need to remove + * from the shape radius to move the point inwards by that x. + * + * We average the left and right distances to get the maximum shape radius that can fit in the box + * along with labels. + * + * Once we have that, we can find the centre point for the chart, by taking the x text protrusion + * on each side, removing that from the size, halving it and adding the left x protrusion width. + * + * This will mean we have a shape fitted to the canvas, as large as it can be with the labels + * and position it in the most space efficient manner + * + * https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif + */ + + var plFont = getPointLabelFontOptions(scale); + + // Get maximum radius of the polygon. Either half the height (minus the text width) or half the width. + // Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points + var largestPossibleRadius = Math.min(scale.height / 2, scale.width / 2); + var furthestLimits = { + r: scale.width, + l: 0, + t: scale.height, + b: 0 + }; + var furthestAngles = {}; + var i, textSize, pointPosition; + + scale.ctx.font = plFont.font; + scale._pointLabelSizes = []; + + var valueCount = getValueCount(scale); + for (i = 0; i < valueCount; i++) { + pointPosition = scale.getPointPosition(i, largestPossibleRadius); + textSize = measureLabelSize(scale.ctx, plFont.size, scale.pointLabels[i] || ''); + scale._pointLabelSizes[i] = textSize; + + // Add quarter circle to make degree 0 mean top of circle + var angleRadians = scale.getIndexAngle(i); + var angle = helpers.toDegrees(angleRadians) % 360; + var hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180); + var vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270); + + if (hLimits.start < furthestLimits.l) { + furthestLimits.l = hLimits.start; + furthestAngles.l = angleRadians; + } + + if (hLimits.end > furthestLimits.r) { + furthestLimits.r = hLimits.end; + furthestAngles.r = angleRadians; + } + + if (vLimits.start < furthestLimits.t) { + furthestLimits.t = vLimits.start; + furthestAngles.t = angleRadians; + } + + if (vLimits.end > furthestLimits.b) { + furthestLimits.b = vLimits.end; + furthestAngles.b = angleRadians; + } + } + + scale.setReductions(largestPossibleRadius, furthestLimits, furthestAngles); + } + + /** + * Helper function to fit a radial linear scale with no point labels + */ + function fit(scale) { + var largestPossibleRadius = Math.min(scale.height / 2, scale.width / 2); + scale.drawingArea = Math.round(largestPossibleRadius); + scale.setCenterPoint(0, 0, 0, 0); + } + + function getTextAlignForAngle(angle) { + if (angle === 0 || angle === 180) { + return 'center'; + } else if (angle < 180) { + return 'left'; + } + + return 'right'; + } + + function fillText(ctx, text, position, fontSize) { + if (helpers.isArray(text)) { + var y = position.y; + var spacing = 1.5 * fontSize; + + for (var i = 0; i < text.length; ++i) { + ctx.fillText(text[i], position.x, y); + y += spacing; + } + } else { + ctx.fillText(text, position.x, position.y); + } + } + + function adjustPointPositionForLabelHeight(angle, textSize, position) { + if (angle === 90 || angle === 270) { + position.y -= (textSize.h / 2); + } else if (angle > 270 || angle < 90) { + position.y -= textSize.h; + } + } + + function drawPointLabels(scale) { + var ctx = scale.ctx; + var opts = scale.options; + var angleLineOpts = opts.angleLines; + var pointLabelOpts = opts.pointLabels; + + ctx.lineWidth = angleLineOpts.lineWidth; + ctx.strokeStyle = angleLineOpts.color; + + var outerDistance = scale.getDistanceFromCenterForValue(opts.ticks.reverse ? scale.min : scale.max); + + // Point Label Font + var plFont = getPointLabelFontOptions(scale); + + ctx.textBaseline = 'top'; + + for (var i = getValueCount(scale) - 1; i >= 0; i--) { + if (angleLineOpts.display) { + var outerPosition = scale.getPointPosition(i, outerDistance); + ctx.beginPath(); + ctx.moveTo(scale.xCenter, scale.yCenter); + ctx.lineTo(outerPosition.x, outerPosition.y); + ctx.stroke(); + ctx.closePath(); + } + + if (pointLabelOpts.display) { + // Extra 3px out for some label spacing + var pointLabelPosition = scale.getPointPosition(i, outerDistance + 5); + + // Keep this in loop since we may support array properties here + var pointLabelFontColor = helpers.valueAtIndexOrDefault(pointLabelOpts.fontColor, i, globalDefaults.defaultFontColor); + ctx.font = plFont.font; + ctx.fillStyle = pointLabelFontColor; + + var angleRadians = scale.getIndexAngle(i); + var angle = helpers.toDegrees(angleRadians); + ctx.textAlign = getTextAlignForAngle(angle); + adjustPointPositionForLabelHeight(angle, scale._pointLabelSizes[i], pointLabelPosition); + fillText(ctx, scale.pointLabels[i] || '', pointLabelPosition, plFont.size); + } + } + } + + function drawRadiusLine(scale, gridLineOpts, radius, index) { + var ctx = scale.ctx; + ctx.strokeStyle = helpers.valueAtIndexOrDefault(gridLineOpts.color, index - 1); + ctx.lineWidth = helpers.valueAtIndexOrDefault(gridLineOpts.lineWidth, index - 1); + + if (scale.options.gridLines.circular) { + // Draw circular arcs between the points + ctx.beginPath(); + ctx.arc(scale.xCenter, scale.yCenter, radius, 0, Math.PI * 2); + ctx.closePath(); + ctx.stroke(); + } else { + // Draw straight lines connecting each index + var valueCount = getValueCount(scale); + + if (valueCount === 0) { + return; + } + + ctx.beginPath(); + var pointPosition = scale.getPointPosition(0, radius); + ctx.moveTo(pointPosition.x, pointPosition.y); + + for (var i = 1; i < valueCount; i++) { + pointPosition = scale.getPointPosition(i, radius); + ctx.lineTo(pointPosition.x, pointPosition.y); + } + + ctx.closePath(); + ctx.stroke(); + } + } + + function numberOrZero(param) { + return helpers.isNumber(param) ? param : 0; + } + + var LinearRadialScale = Chart.LinearScaleBase.extend({ + setDimensions: function() { + var me = this; + var opts = me.options; + var tickOpts = opts.ticks; + // Set the unconstrained dimension before label rotation + me.width = me.maxWidth; + me.height = me.maxHeight; + me.xCenter = Math.round(me.width / 2); + me.yCenter = Math.round(me.height / 2); + + var minSize = helpers.min([me.height, me.width]); + var tickFontSize = helpers.valueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize); + me.drawingArea = opts.display ? (minSize / 2) - (tickFontSize / 2 + tickOpts.backdropPaddingY) : (minSize / 2); + }, + determineDataLimits: function() { + var me = this; + var chart = me.chart; + var min = Number.POSITIVE_INFINITY; + var max = Number.NEGATIVE_INFINITY; + + helpers.each(chart.data.datasets, function(dataset, datasetIndex) { + if (chart.isDatasetVisible(datasetIndex)) { + var meta = chart.getDatasetMeta(datasetIndex); + + helpers.each(dataset.data, function(rawValue, index) { + var value = +me.getRightValue(rawValue); + if (isNaN(value) || meta.data[index].hidden) { + return; + } + + min = Math.min(value, min); + max = Math.max(value, max); + }); + } + }); + + me.min = (min === Number.POSITIVE_INFINITY ? 0 : min); + me.max = (max === Number.NEGATIVE_INFINITY ? 0 : max); + + // Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero + me.handleTickRangeOptions(); + }, + getTickLimit: function() { + var tickOpts = this.options.ticks; + var tickFontSize = helpers.valueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize); + return Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(this.drawingArea / (1.5 * tickFontSize))); + }, + convertTicksToLabels: function() { + var me = this; + + Chart.LinearScaleBase.prototype.convertTicksToLabels.call(me); + + // Point labels + me.pointLabels = me.chart.data.labels.map(me.options.pointLabels.callback, me); + }, + getLabelForIndex: function(index, datasetIndex) { + return +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]); + }, + fit: function() { + if (this.options.pointLabels.display) { + fitWithPointLabels(this); + } else { + fit(this); + } + }, + /** + * Set radius reductions and determine new radius and center point + * @private + */ + setReductions: function(largestPossibleRadius, furthestLimits, furthestAngles) { + var me = this; + var radiusReductionLeft = furthestLimits.l / Math.sin(furthestAngles.l); + var radiusReductionRight = Math.max(furthestLimits.r - me.width, 0) / Math.sin(furthestAngles.r); + var radiusReductionTop = -furthestLimits.t / Math.cos(furthestAngles.t); + var radiusReductionBottom = -Math.max(furthestLimits.b - me.height, 0) / Math.cos(furthestAngles.b); + + radiusReductionLeft = numberOrZero(radiusReductionLeft); + radiusReductionRight = numberOrZero(radiusReductionRight); + radiusReductionTop = numberOrZero(radiusReductionTop); + radiusReductionBottom = numberOrZero(radiusReductionBottom); + + me.drawingArea = Math.min( + Math.round(largestPossibleRadius - (radiusReductionLeft + radiusReductionRight) / 2), + Math.round(largestPossibleRadius - (radiusReductionTop + radiusReductionBottom) / 2)); + me.setCenterPoint(radiusReductionLeft, radiusReductionRight, radiusReductionTop, radiusReductionBottom); + }, + setCenterPoint: function(leftMovement, rightMovement, topMovement, bottomMovement) { + var me = this; + var maxRight = me.width - rightMovement - me.drawingArea; + var maxLeft = leftMovement + me.drawingArea; + var maxTop = topMovement + me.drawingArea; + var maxBottom = me.height - bottomMovement - me.drawingArea; + + me.xCenter = Math.round(((maxLeft + maxRight) / 2) + me.left); + me.yCenter = Math.round(((maxTop + maxBottom) / 2) + me.top); + }, + + getIndexAngle: function(index) { + var angleMultiplier = (Math.PI * 2) / getValueCount(this); + var startAngle = this.chart.options && this.chart.options.startAngle ? + this.chart.options.startAngle : + 0; + + var startAngleRadians = startAngle * Math.PI * 2 / 360; + + // Start from the top instead of right, so remove a quarter of the circle + return index * angleMultiplier + startAngleRadians; + }, + getDistanceFromCenterForValue: function(value) { + var me = this; + + if (value === null) { + return 0; // null always in center + } + + // Take into account half font size + the yPadding of the top value + var scalingFactor = me.drawingArea / (me.max - me.min); + if (me.options.ticks.reverse) { + return (me.max - value) * scalingFactor; + } + return (value - me.min) * scalingFactor; + }, + getPointPosition: function(index, distanceFromCenter) { + var me = this; + var thisAngle = me.getIndexAngle(index) - (Math.PI / 2); + return { + x: Math.round(Math.cos(thisAngle) * distanceFromCenter) + me.xCenter, + y: Math.round(Math.sin(thisAngle) * distanceFromCenter) + me.yCenter + }; + }, + getPointPositionForValue: function(index, value) { + return this.getPointPosition(index, this.getDistanceFromCenterForValue(value)); + }, + + getBasePosition: function() { + var me = this; + var min = me.min; + var max = me.max; + + return me.getPointPositionForValue(0, + me.beginAtZero ? 0 : + min < 0 && max < 0 ? max : + min > 0 && max > 0 ? min : + 0); + }, + + draw: function() { + var me = this; + var opts = me.options; + var gridLineOpts = opts.gridLines; + var tickOpts = opts.ticks; + var valueOrDefault = helpers.valueOrDefault; + + if (opts.display) { + var ctx = me.ctx; + var startAngle = this.getIndexAngle(0); + + // Tick Font + var tickFontSize = valueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize); + var tickFontStyle = valueOrDefault(tickOpts.fontStyle, globalDefaults.defaultFontStyle); + var tickFontFamily = valueOrDefault(tickOpts.fontFamily, globalDefaults.defaultFontFamily); + var tickLabelFont = helpers.fontString(tickFontSize, tickFontStyle, tickFontFamily); + + helpers.each(me.ticks, function(label, index) { + // Don't draw a centre value (if it is minimum) + if (index > 0 || tickOpts.reverse) { + var yCenterOffset = me.getDistanceFromCenterForValue(me.ticksAsNumbers[index]); + + // Draw circular lines around the scale + if (gridLineOpts.display && index !== 0) { + drawRadiusLine(me, gridLineOpts, yCenterOffset, index); + } + + if (tickOpts.display) { + var tickFontColor = valueOrDefault(tickOpts.fontColor, globalDefaults.defaultFontColor); + ctx.font = tickLabelFont; + + ctx.save(); + ctx.translate(me.xCenter, me.yCenter); + ctx.rotate(startAngle); + + if (tickOpts.showLabelBackdrop) { + var labelWidth = ctx.measureText(label).width; + ctx.fillStyle = tickOpts.backdropColor; + ctx.fillRect( + -labelWidth / 2 - tickOpts.backdropPaddingX, + -yCenterOffset - tickFontSize / 2 - tickOpts.backdropPaddingY, + labelWidth + tickOpts.backdropPaddingX * 2, + tickFontSize + tickOpts.backdropPaddingY * 2 + ); + } + + ctx.textAlign = 'center'; + ctx.textBaseline = 'middle'; + ctx.fillStyle = tickFontColor; + ctx.fillText(label, 0, -yCenterOffset); + ctx.restore(); + } + } + }); + + if (opts.angleLines.display || opts.pointLabels.display) { + drawPointLabels(me); + } + } + } + }); + + scaleService.registerScaleType('radialLinear', LinearRadialScale, defaultConfig); +}; + +},{"26":26,"34":34,"35":35,"46":46}],59:[function(require,module,exports){ +/* global window: false */ +'use strict'; + +var moment = require(6); +moment = typeof moment === 'function' ? moment : window.moment; + +var defaults = require(26); +var helpers = require(46); +var Scale = require(33); +var scaleService = require(34); + +// Integer constants are from the ES6 spec. +var MIN_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991; +var MAX_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + +var INTERVALS = { + millisecond: { + common: true, + size: 1, + steps: [1, 2, 5, 10, 20, 50, 100, 250, 500] + }, + second: { + common: true, + size: 1000, + steps: [1, 2, 5, 10, 15, 30] + }, + minute: { + common: true, + size: 60000, + steps: [1, 2, 5, 10, 15, 30] + }, + hour: { + common: true, + size: 3600000, + steps: [1, 2, 3, 6, 12] + }, + day: { + common: true, + size: 86400000, + steps: [1, 2, 5] + }, + week: { + common: false, + size: 604800000, + steps: [1, 2, 3, 4] + }, + month: { + common: true, + size: 2.628e9, + steps: [1, 2, 3] + }, + quarter: { + common: false, + size: 7.884e9, + steps: [1, 2, 3, 4] + }, + year: { + common: true, + size: 3.154e10 + } +}; + +var UNITS = Object.keys(INTERVALS); + +function sorter(a, b) { + return a - b; +} + +function arrayUnique(items) { + var hash = {}; + var out = []; + var i, ilen, item; + + for (i = 0, ilen = items.length; i < ilen; ++i) { + item = items[i]; + if (!hash[item]) { + hash[item] = true; + out.push(item); + } + } + + return out; +} + +/** + * Returns an array of {time, pos} objects used to interpolate a specific `time` or position + * (`pos`) on the scale, by searching entries before and after the requested value. `pos` is + * a decimal between 0 and 1: 0 being the start of the scale (left or top) and 1 the other + * extremity (left + width or top + height). Note that it would be more optimized to directly + * store pre-computed pixels, but the scale dimensions are not guaranteed at the time we need + * to create the lookup table. The table ALWAYS contains at least two items: min and max. + * + * @param {Number[]} timestamps - timestamps sorted from lowest to highest. + * @param {String} distribution - If 'linear', timestamps will be spread linearly along the min + * and max range, so basically, the table will contains only two items: {min, 0} and {max, 1}. + * If 'series', timestamps will be positioned at the same distance from each other. In this + * case, only timestamps that break the time linearity are registered, meaning that in the + * best case, all timestamps are linear, the table contains only min and max. + */ +function buildLookupTable(timestamps, min, max, distribution) { + if (distribution === 'linear' || !timestamps.length) { + return [ + {time: min, pos: 0}, + {time: max, pos: 1} + ]; + } + + var table = []; + var items = [min]; + var i, ilen, prev, curr, next; + + for (i = 0, ilen = timestamps.length; i < ilen; ++i) { + curr = timestamps[i]; + if (curr > min && curr < max) { + items.push(curr); + } + } + + items.push(max); + + for (i = 0, ilen = items.length; i < ilen; ++i) { + next = items[i + 1]; + prev = items[i - 1]; + curr = items[i]; + + // only add points that breaks the scale linearity + if (prev === undefined || next === undefined || Math.round((next + prev) / 2) !== curr) { + table.push({time: curr, pos: i / (ilen - 1)}); + } + } + + return table; +} + +// @see adapted from http://www.anujgakhar.com/2014/03/01/binary-search-in-javascript/ +function lookup(table, key, value) { + var lo = 0; + var hi = table.length - 1; + var mid, i0, i1; + + while (lo >= 0 && lo <= hi) { + mid = (lo + hi) >> 1; + i0 = table[mid - 1] || null; + i1 = table[mid]; + + if (!i0) { + // given value is outside table (before first item) + return {lo: null, hi: i1}; + } else if (i1[key] < value) { + lo = mid + 1; + } else if (i0[key] > value) { + hi = mid - 1; + } else { + return {lo: i0, hi: i1}; + } + } + + // given value is outside table (after last item) + return {lo: i1, hi: null}; +} + +/** + * Linearly interpolates the given source `value` using the table items `skey` values and + * returns the associated `tkey` value. For example, interpolate(table, 'time', 42, 'pos') + * returns the position for a timestamp equal to 42. If value is out of bounds, values at + * index [0, 1] or [n - 1, n] are used for the interpolation. + */ +function interpolate(table, skey, sval, tkey) { + var range = lookup(table, skey, sval); + + // Note: the lookup table ALWAYS contains at least 2 items (min and max) + var prev = !range.lo ? table[0] : !range.hi ? table[table.length - 2] : range.lo; + var next = !range.lo ? table[1] : !range.hi ? table[table.length - 1] : range.hi; + + var span = next[skey] - prev[skey]; + var ratio = span ? (sval - prev[skey]) / span : 0; + var offset = (next[tkey] - prev[tkey]) * ratio; + + return prev[tkey] + offset; +} + +/** + * Convert the given value to a moment object using the given time options. + * @see http://momentjs.com/docs/#/parsing/ + */ +function momentify(value, options) { + var parser = options.parser; + var format = options.parser || options.format; + + if (typeof parser === 'function') { + return parser(value); + } + + if (typeof value === 'string' && typeof format === 'string') { + return moment(value, format); + } + + if (!(value instanceof moment)) { + value = moment(value); + } + + if (value.isValid()) { + return value; + } + + // Labels are in an incompatible moment format and no `parser` has been provided. + // The user might still use the deprecated `format` option to convert his inputs. + if (typeof format === 'function') { + return format(value); + } + + return value; +} + +function parse(input, scale) { + if (helpers.isNullOrUndef(input)) { + return null; + } + + var options = scale.options.time; + var value = momentify(scale.getRightValue(input), options); + if (!value.isValid()) { + return null; + } + + if (options.round) { + value.startOf(options.round); + } + + return value.valueOf(); +} + +/** + * Returns the number of unit to skip to be able to display up to `capacity` number of ticks + * in `unit` for the given `min` / `max` range and respecting the interval steps constraints. + */ +function determineStepSize(min, max, unit, capacity) { + var range = max - min; + var interval = INTERVALS[unit]; + var milliseconds = interval.size; + var steps = interval.steps; + var i, ilen, factor; + + if (!steps) { + return Math.ceil(range / (capacity * milliseconds)); + } + + for (i = 0, ilen = steps.length; i < ilen; ++i) { + factor = steps[i]; + if (Math.ceil(range / (milliseconds * factor)) <= capacity) { + break; + } + } + + return factor; +} + +/** + * Figures out what unit results in an appropriate number of auto-generated ticks + */ +function determineUnitForAutoTicks(minUnit, min, max, capacity) { + var ilen = UNITS.length; + var i, interval, factor; + + for (i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) { + interval = INTERVALS[UNITS[i]]; + factor = interval.steps ? interval.steps[interval.steps.length - 1] : MAX_INTEGER; + + if (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) { + return UNITS[i]; + } + } + + return UNITS[ilen - 1]; +} + +/** + * Figures out what unit to format a set of ticks with + */ +function determineUnitForFormatting(ticks, minUnit, min, max) { + var duration = moment.duration(moment(max).diff(moment(min))); + var ilen = UNITS.length; + var i, unit; + + for (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) { + unit = UNITS[i]; + if (INTERVALS[unit].common && duration.as(unit) >= ticks.length) { + return unit; + } + } + + return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0]; +} + +function determineMajorUnit(unit) { + for (var i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) { + if (INTERVALS[UNITS[i]].common) { + return UNITS[i]; + } + } +} + +/** + * Generates a maximum of `capacity` timestamps between min and max, rounded to the + * `minor` unit, aligned on the `major` unit and using the given scale time `options`. + * Important: this method can return ticks outside the min and max range, it's the + * responsibility of the calling code to clamp values if needed. + */ +function generate(min, max, capacity, options) { + var timeOpts = options.time; + var minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, capacity); + var major = determineMajorUnit(minor); + var stepSize = helpers.valueOrDefault(timeOpts.stepSize, timeOpts.unitStepSize); + var weekday = minor === 'week' ? timeOpts.isoWeekday : false; + var majorTicksEnabled = options.ticks.major.enabled; + var interval = INTERVALS[minor]; + var first = moment(min); + var last = moment(max); + var ticks = []; + var time; + + if (!stepSize) { + stepSize = determineStepSize(min, max, minor, capacity); + } + + // For 'week' unit, handle the first day of week option + if (weekday) { + first = first.isoWeekday(weekday); + last = last.isoWeekday(weekday); + } + + // Align first/last ticks on unit + first = first.startOf(weekday ? 'day' : minor); + last = last.startOf(weekday ? 'day' : minor); + + // Make sure that the last tick include max + if (last < max) { + last.add(1, minor); + } + + time = moment(first); + + if (majorTicksEnabled && major && !weekday && !timeOpts.round) { + // Align the first tick on the previous `minor` unit aligned on the `major` unit: + // we first aligned time on the previous `major` unit then add the number of full + // stepSize there is between first and the previous major time. + time.startOf(major); + time.add(~~((first - time) / (interval.size * stepSize)) * stepSize, minor); + } + + for (; time < last; time.add(stepSize, minor)) { + ticks.push(+time); + } + + ticks.push(+time); + + return ticks; +} + +/** + * Returns the right and left offsets from edges in the form of {left, right}. + * Offsets are added when the `offset` option is true. + */ +function computeOffsets(table, ticks, min, max, options) { + var left = 0; + var right = 0; + var upper, lower; + + if (options.offset && ticks.length) { + if (!options.time.min) { + upper = ticks.length > 1 ? ticks[1] : max; + lower = ticks[0]; + left = ( + interpolate(table, 'time', upper, 'pos') - + interpolate(table, 'time', lower, 'pos') + ) / 2; + } + if (!options.time.max) { + upper = ticks[ticks.length - 1]; + lower = ticks.length > 1 ? ticks[ticks.length - 2] : min; + right = ( + interpolate(table, 'time', upper, 'pos') - + interpolate(table, 'time', lower, 'pos') + ) / 2; + } + } + + return {left: left, right: right}; +} + +function ticksFromTimestamps(values, majorUnit) { + var ticks = []; + var i, ilen, value, major; + + for (i = 0, ilen = values.length; i < ilen; ++i) { + value = values[i]; + major = majorUnit ? value === +moment(value).startOf(majorUnit) : false; + + ticks.push({ + value: value, + major: major + }); + } + + return ticks; +} + +function determineLabelFormat(data, timeOpts) { + var i, momentDate, hasTime; + var ilen = data.length; + + // find the label with the most parts (milliseconds, minutes, etc.) + // format all labels with the same level of detail as the most specific label + for (i = 0; i < ilen; i++) { + momentDate = momentify(data[i], timeOpts); + if (momentDate.millisecond() !== 0) { + return 'MMM D, YYYY h:mm:ss.SSS a'; + } + if (momentDate.second() !== 0 || momentDate.minute() !== 0 || momentDate.hour() !== 0) { + hasTime = true; + } + } + if (hasTime) { + return 'MMM D, YYYY h:mm:ss a'; + } + return 'MMM D, YYYY'; +} + +module.exports = function() { + + var defaultConfig = { + position: 'bottom', + + /** + * Data distribution along the scale: + * - 'linear': data are spread according to their time (distances can vary), + * - 'series': data are spread at the same distance from each other. + * @see https://github.com/chartjs/Chart.js/pull/4507 + * @since 2.7.0 + */ + distribution: 'linear', + + /** + * Scale boundary strategy (bypassed by min/max time options) + * - `data`: make sure data are fully visible, ticks outside are removed + * - `ticks`: make sure ticks are fully visible, data outside are truncated + * @see https://github.com/chartjs/Chart.js/pull/4556 + * @since 2.7.0 + */ + bounds: 'data', + + time: { + parser: false, // false == a pattern string from http://momentjs.com/docs/#/parsing/string-format/ or a custom callback that converts its argument to a moment + format: false, // DEPRECATED false == date objects, moment object, callback or a pattern string from http://momentjs.com/docs/#/parsing/string-format/ + unit: false, // false == automatic or override with week, month, year, etc. + round: false, // none, or override with week, month, year, etc. + displayFormat: false, // DEPRECATED + isoWeekday: false, // override week start day - see http://momentjs.com/docs/#/get-set/iso-weekday/ + minUnit: 'millisecond', + + // defaults to unit's corresponding unitFormat below or override using pattern string from http://momentjs.com/docs/#/displaying/format/ + displayFormats: { + millisecond: 'h:mm:ss.SSS a', // 11:20:01.123 AM, + second: 'h:mm:ss a', // 11:20:01 AM + minute: 'h:mm a', // 11:20 AM + hour: 'hA', // 5PM + day: 'MMM D', // Sep 4 + week: 'll', // Week 46, or maybe "[W]WW - YYYY" ? + month: 'MMM YYYY', // Sept 2015 + quarter: '[Q]Q - YYYY', // Q3 + year: 'YYYY' // 2015 + }, + }, + ticks: { + autoSkip: false, + + /** + * Ticks generation input values: + * - 'auto': generates "optimal" ticks based on scale size and time options. + * - 'data': generates ticks from data (including labels from data {t|x|y} objects). + * - 'labels': generates ticks from user given `data.labels` values ONLY. + * @see https://github.com/chartjs/Chart.js/pull/4507 + * @since 2.7.0 + */ + source: 'auto', + + major: { + enabled: false + } + } + }; + + var TimeScale = Scale.extend({ + initialize: function() { + if (!moment) { + throw new Error('Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com'); + } + + this.mergeTicksOptions(); + + Scale.prototype.initialize.call(this); + }, + + update: function() { + var me = this; + var options = me.options; + + // DEPRECATIONS: output a message only one time per update + if (options.time && options.time.format) { + console.warn('options.time.format is deprecated and replaced by options.time.parser.'); + } + + return Scale.prototype.update.apply(me, arguments); + }, + + /** + * Allows data to be referenced via 't' attribute + */ + getRightValue: function(rawValue) { + if (rawValue && rawValue.t !== undefined) { + rawValue = rawValue.t; + } + return Scale.prototype.getRightValue.call(this, rawValue); + }, + + determineDataLimits: function() { + var me = this; + var chart = me.chart; + var timeOpts = me.options.time; + var unit = timeOpts.unit || 'day'; + var min = MAX_INTEGER; + var max = MIN_INTEGER; + var timestamps = []; + var datasets = []; + var labels = []; + var i, j, ilen, jlen, data, timestamp; + + // Convert labels to timestamps + for (i = 0, ilen = chart.data.labels.length; i < ilen; ++i) { + labels.push(parse(chart.data.labels[i], me)); + } + + // Convert data to timestamps + for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) { + if (chart.isDatasetVisible(i)) { + data = chart.data.datasets[i].data; + + // Let's consider that all data have the same format. + if (helpers.isObject(data[0])) { + datasets[i] = []; + + for (j = 0, jlen = data.length; j < jlen; ++j) { + timestamp = parse(data[j], me); + timestamps.push(timestamp); + datasets[i][j] = timestamp; + } + } else { + timestamps.push.apply(timestamps, labels); + datasets[i] = labels.slice(0); + } + } else { + datasets[i] = []; + } + } + + if (labels.length) { + // Sort labels **after** data have been converted + labels = arrayUnique(labels).sort(sorter); + min = Math.min(min, labels[0]); + max = Math.max(max, labels[labels.length - 1]); + } + + if (timestamps.length) { + timestamps = arrayUnique(timestamps).sort(sorter); + min = Math.min(min, timestamps[0]); + max = Math.max(max, timestamps[timestamps.length - 1]); + } + + min = parse(timeOpts.min, me) || min; + max = parse(timeOpts.max, me) || max; + + // In case there is no valid min/max, set limits based on unit time option + min = min === MAX_INTEGER ? +moment().startOf(unit) : min; + max = max === MIN_INTEGER ? +moment().endOf(unit) + 1 : max; + + // Make sure that max is strictly higher than min (required by the lookup table) + me.min = Math.min(min, max); + me.max = Math.max(min + 1, max); + + // PRIVATE + me._horizontal = me.isHorizontal(); + me._table = []; + me._timestamps = { + data: timestamps, + datasets: datasets, + labels: labels + }; + }, + + buildTicks: function() { + var me = this; + var min = me.min; + var max = me.max; + var options = me.options; + var timeOpts = options.time; + var timestamps = []; + var ticks = []; + var i, ilen, timestamp; + + switch (options.ticks.source) { + case 'data': + timestamps = me._timestamps.data; + break; + case 'labels': + timestamps = me._timestamps.labels; + break; + case 'auto': + default: + timestamps = generate(min, max, me.getLabelCapacity(min), options); + } + + if (options.bounds === 'ticks' && timestamps.length) { + min = timestamps[0]; + max = timestamps[timestamps.length - 1]; + } + + // Enforce limits with user min/max options + min = parse(timeOpts.min, me) || min; + max = parse(timeOpts.max, me) || max; + + // Remove ticks outside the min/max range + for (i = 0, ilen = timestamps.length; i < ilen; ++i) { + timestamp = timestamps[i]; + if (timestamp >= min && timestamp <= max) { + ticks.push(timestamp); + } + } + + me.min = min; + me.max = max; + + // PRIVATE + me._unit = timeOpts.unit || determineUnitForFormatting(ticks, timeOpts.minUnit, me.min, me.max); + me._majorUnit = determineMajorUnit(me._unit); + me._table = buildLookupTable(me._timestamps.data, min, max, options.distribution); + me._offsets = computeOffsets(me._table, ticks, min, max, options); + me._labelFormat = determineLabelFormat(me._timestamps.data, timeOpts); + + return ticksFromTimestamps(ticks, me._majorUnit); + }, + + getLabelForIndex: function(index, datasetIndex) { + var me = this; + var data = me.chart.data; + var timeOpts = me.options.time; + var label = data.labels && index < data.labels.length ? data.labels[index] : ''; + var value = data.datasets[datasetIndex].data[index]; + + if (helpers.isObject(value)) { + label = me.getRightValue(value); + } + if (timeOpts.tooltipFormat) { + return momentify(label, timeOpts).format(timeOpts.tooltipFormat); + } + if (typeof label === 'string') { + return label; + } + + return momentify(label, timeOpts).format(me._labelFormat); + }, + + /** + * Function to format an individual tick mark + * @private + */ + tickFormatFunction: function(tick, index, ticks, formatOverride) { + var me = this; + var options = me.options; + var time = tick.valueOf(); + var formats = options.time.displayFormats; + var minorFormat = formats[me._unit]; + var majorUnit = me._majorUnit; + var majorFormat = formats[majorUnit]; + var majorTime = tick.clone().startOf(majorUnit).valueOf(); + var majorTickOpts = options.ticks.major; + var major = majorTickOpts.enabled && majorUnit && majorFormat && time === majorTime; + var label = tick.format(formatOverride ? formatOverride : major ? majorFormat : minorFormat); + var tickOpts = major ? majorTickOpts : options.ticks.minor; + var formatter = helpers.valueOrDefault(tickOpts.callback, tickOpts.userCallback); + + return formatter ? formatter(label, index, ticks) : label; + }, + + convertTicksToLabels: function(ticks) { + var labels = []; + var i, ilen; + + for (i = 0, ilen = ticks.length; i < ilen; ++i) { + labels.push(this.tickFormatFunction(moment(ticks[i].value), i, ticks)); + } + + return labels; + }, + + /** + * @private + */ + getPixelForOffset: function(time) { + var me = this; + var size = me._horizontal ? me.width : me.height; + var start = me._horizontal ? me.left : me.top; + var pos = interpolate(me._table, 'time', time, 'pos'); + + return start + size * (me._offsets.left + pos) / (me._offsets.left + 1 + me._offsets.right); + }, + + getPixelForValue: function(value, index, datasetIndex) { + var me = this; + var time = null; + + if (index !== undefined && datasetIndex !== undefined) { + time = me._timestamps.datasets[datasetIndex][index]; + } + + if (time === null) { + time = parse(value, me); + } + + if (time !== null) { + return me.getPixelForOffset(time); + } + }, + + getPixelForTick: function(index) { + var ticks = this.getTicks(); + return index >= 0 && index < ticks.length ? + this.getPixelForOffset(ticks[index].value) : + null; + }, + + getValueForPixel: function(pixel) { + var me = this; + var size = me._horizontal ? me.width : me.height; + var start = me._horizontal ? me.left : me.top; + var pos = (size ? (pixel - start) / size : 0) * (me._offsets.left + 1 + me._offsets.left) - me._offsets.right; + var time = interpolate(me._table, 'pos', pos, 'time'); + + return moment(time); + }, + + /** + * Crude approximation of what the label width might be + * @private + */ + getLabelWidth: function(label) { + var me = this; + var ticksOpts = me.options.ticks; + var tickLabelWidth = me.ctx.measureText(label).width; + var angle = helpers.toRadians(ticksOpts.maxRotation); + var cosRotation = Math.cos(angle); + var sinRotation = Math.sin(angle); + var tickFontSize = helpers.valueOrDefault(ticksOpts.fontSize, defaults.global.defaultFontSize); + + return (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation); + }, + + /** + * @private + */ + getLabelCapacity: function(exampleTime) { + var me = this; + + var formatOverride = me.options.time.displayFormats.millisecond; // Pick the longest format for guestimation + + var exampleLabel = me.tickFormatFunction(moment(exampleTime), 0, [], formatOverride); + var tickLabelWidth = me.getLabelWidth(exampleLabel); + var innerWidth = me.isHorizontal() ? me.width : me.height; + + var capacity = Math.floor(innerWidth / tickLabelWidth); + return capacity > 0 ? capacity : 1; + } + }); + + scaleService.registerScaleType('time', TimeScale, defaultConfig); +}; + +},{"26":26,"33":33,"34":34,"46":46,"6":6}]},{},[7])(7) +}); \ No newline at end of file diff --git a/admin/js/bootstrap-notify.min.js b/admin/js/bootstrap-notify.min.js new file mode 100644 index 0000000..725e285 --- /dev/null +++ b/admin/js/bootstrap-notify.min.js @@ -0,0 +1,2 @@ +/* Project: Bootstrap Growl = v3.1.3 | Description: Turns standard Bootstrap alerts into "Growl-like" notifications. | Author: Mouse0270 aka Robert McIntosh | License: MIT License | Website: https://github.com/mouse0270/bootstrap-growl */ +!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){function e(e,i,n){var i={content:{message:"object"==typeof i?i.message:i,title:i.title?i.title:"",icon:i.icon?i.icon:"",url:i.url?i.url:"#",target:i.target?i.target:"-"}};n=t.extend(!0,{},i,n),this.settings=t.extend(!0,{},s,n),this._defaults=s,"-"==this.settings.content.target&&(this.settings.content.target=this.settings.url_target),this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"},"number"==typeof this.settings.offset&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset}),this.init()}var s={element:"body",position:null,type:"info",allow_dismiss:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:"class",template:''};String.format=function(){for(var t=arguments[0],e=1;e .progress-bar').removeClass("progress-bar-"+t.settings.type),t.settings.type=i[e],this.$ele.addClass("alert-"+i[e]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+i[e]);break;case"icon":var n=this.$ele.find('[data-notify="icon"]');"class"==t.settings.icon_type.toLowerCase()?n.removeClass(t.settings.content.icon).addClass(i[e]):(n.is("img")||n.find("img"),n.attr("src",i[e]));break;case"progress":var a=t.settings.delay-t.settings.delay*(i[e]/100);this.$ele.data("notify-delay",a),this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",i[e]).css("width",i[e]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",i[e]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",i[e]);break;default:this.$ele.find('[data-notify="'+e+'"]').html(i[e])}var o=this.$ele.outerHeight()+parseInt(t.settings.spacing)+parseInt(t.settings.offset.y);t.reposition(o)},close:function(){t.close()}}},buildNotify:function(){var e=this.settings.content;this.$ele=t(String.format(this.settings.template,this.settings.type,e.title,e.message,e.url,e.target)),this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align),this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none"),(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){"class"==this.settings.icon_type.toLowerCase()?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('Notify Icon')},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:"0px",position:"absolute",top:"0px",width:"100%",zIndex:this.settings.z_index+1}),this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},placement:function(){var e=this,s=this.settings.offset.y,i={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:"body"===this.settings.element?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},n=!1,a=this.settings;switch(t('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){return s=Math.max(s,parseInt(t(this).css(a.placement.from))+parseInt(t(this).outerHeight())+parseInt(a.spacing))}),1==this.settings.newest_on_top&&(s=this.settings.offset.y),i[this.settings.placement.from]=s+"px",this.settings.placement.align){case"left":case"right":i[this.settings.placement.align]=this.settings.offset.x+"px";break;case"center":i.left=0,i.right=0}this.$ele.css(i).addClass(this.settings.animate.enter),t.each(Array("webkit","moz","o","ms",""),function(t,s){e.$ele[0].style[s+"AnimationIterationCount"]=1}),t(this.settings.element).append(this.$ele),1==this.settings.newest_on_top&&(s=parseInt(s)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(s)),t.isFunction(e.settings.onShow)&&e.settings.onShow.call(this.$ele),this.$ele.one(this.animations.start,function(){n=!0}).one(this.animations.end,function(){t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)}),setTimeout(function(){n||t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)},600)},bind:function(){var e=this;if(this.$ele.find('[data-notify="dismiss"]').on("click",function(){e.close()}),this.$ele.mouseover(function(){t(this).data("data-hover","true")}).mouseout(function(){t(this).data("data-hover","false")}),this.$ele.data("data-hover","false"),this.settings.delay>0){e.$ele.data("notify-delay",e.settings.delay);var s=setInterval(function(){var t=parseInt(e.$ele.data("notify-delay"))-e.settings.timer;if("false"===e.$ele.data("data-hover")&&"pause"==e.settings.mouse_over||"pause"!=e.settings.mouse_over){var i=(e.settings.delay-t)/e.settings.delay*100;e.$ele.data("notify-delay",t),e.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",i).css("width",i+"%")}t<=-e.settings.timer&&(clearInterval(s),e.close())},e.settings.timer)}},close:function(){var e=this,s=parseInt(this.$ele.css(this.settings.placement.from)),i=!1;this.$ele.data("closing","true").addClass(this.settings.animate.exit),e.reposition(s),t.isFunction(e.settings.onClose)&&e.settings.onClose.call(this.$ele),this.$ele.one(this.animations.start,function(){i=!0}).one(this.animations.end,function(){t(this).remove(),t.isFunction(e.settings.onClosed)&&e.settings.onClosed.call(this)}),setTimeout(function(){i||(e.$ele.remove(),e.settings.onClosed&&e.settings.onClosed(e.$ele))},600)},reposition:function(e){var s=this,i='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',n=this.$ele.nextAll(i);1==this.settings.newest_on_top&&(n=this.$ele.prevAll(i)),n.each(function(){t(this).css(s.settings.placement.from,e),e=parseInt(e)+parseInt(s.settings.spacing)+t(this).outerHeight()})}}),t.notify=function(t,s){var i=new e(this,t,s);return i.notify},t.notifyDefaults=function(e){return s=t.extend(!0,{},s,e)},t.notifyClose=function(e){"undefined"==typeof e||"all"==e?t("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):t('[data-notify-position="'+e+'"]').find('[data-notify="dismiss"]').trigger("click")}}); \ No newline at end of file diff --git a/admin/js/bootstrap.min.js b/admin/js/bootstrap.min.js new file mode 100644 index 0000000..e1cd129 --- /dev/null +++ b/admin/js/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/admin/js/coloris.min.js b/admin/js/coloris.min.js new file mode 100644 index 0000000..5ae6048 --- /dev/null +++ b/admin/js/coloris.min.js @@ -0,0 +1,6 @@ +/*! + * Copyright (c) 2021 Momo Bassit. + * Licensed under the MIT License (MIT) + * https://github.com/mdbassit/Coloris + */ +!function(u,d,s){var f,h,v,i,o,y,c,r,p,g,b,m,a=d.createElement("canvas").getContext("2d"),w={r:0,g:0,b:0,a:1},k={el:"[data-coloris]",parent:null,theme:"light",wrap:!0,margin:2,format:"hex",swatches:[],a11y:{open:"Open color picker",close:"Close color picker",marker:"Saturation: {s}. Brightness: {v}.",hueSlider:"Hue slider",alphaSlider:"Opacity slider",input:"Color value field",swatch:"Color swatch",instruction:"Saturation and brightness selector. Use up, down, left and right arrow keys to select."}};function n(e){if("object"==typeof e)for(var t in e)switch(t){case"el":x(e.el),!1!==e.wrap&&E(e.el);break;case"parent":k.parent=d.querySelector(e.parent),k.parent&&k.parent.appendChild(f);break;case"theme":f.setAttribute("class","clr-picker clr-"+e.theme);break;case"margin":e.margin*=1,k.margin=(isNaN(e.margin)?k:e).margin;break;case"wrap":e.el&&e.wrap&&E(e.el);break;case"format":k.format=e.format;break;case"swatches":Array.isArray(e.swatches)&&function(){var a=[];e.swatches.forEach(function(e,t){a.push('")}),a.length&&(N("clr-swatches").innerHTML="
    "+a.join("")+"
    ")}();break;case"a11y":var a,r,l=e.a11y,n=!1;if("object"==typeof l)for(var i in l)l[i]&&k.a11y[i]&&(k.a11y[i]=l[i],n=!0);n&&(a=N("clr-open-label"),r=N("clr-swatch-label"),a.innerHTML=k.a11y.open,r.innerHTML=k.a11y.swatch,o.setAttribute("aria-label",k.a11y.close),c.setAttribute("aria-label",k.a11y.hueSlider),p.setAttribute("aria-label",k.a11y.alphaSlider),y.setAttribute("aria-label",k.a11y.input),h.setAttribute("aria-label",k.a11y.instruction))}}function x(e){D(d,"click",e,function(e){var t=k.parent,a=e.target.getBoundingClientRect(),r=u.scrollY,l={left:!1,top:!1},n={x:0,y:0},i=a.x,o=r+a.y+a.height+k.margin;b=e.target,m=b.value,f.classList.add("clr-open");var c,s=f.offsetWidth,p=f.offsetHeight;t?(c=u.getComputedStyle(t),e=parseFloat(c.marginTop),c=parseFloat(c.borderTopWidth),(n=t.getBoundingClientRect()).y+=c+r,i-=n.x,o-=n.y,i+s>t.clientWidth&&(i+=a.width-s,l.left=!0),o+p>t.clientHeight-e&&(o-=a.height+p+2*k.margin,l.top=!0),o+=t.scrollTop):(i+s>d.documentElement.clientWidth&&(i+=a.width-s,l.left=!0),o+p-r>d.documentElement.clientHeight&&(o=r+a.y-p-k.margin,l.top=!0)),f.style.left=i+"px",f.style.top=o+"px",v={width:h.offsetWidth,height:h.offsetHeight,x:f.offsetLeft+n.x,y:f.offsetTop+n.y},f.classList.toggle("clr-left",l.left),f.classList.toggle("clr-top",l.top),S(b.value),y.focus({preventScroll:!0})}),D(d,"input",e,function(e){var t=e.target.parentNode;t.classList.contains("clr-field")&&(t.style.color=e.target.value)})}function E(e){d.querySelectorAll(e).forEach(function(e){var t,a=e.parentNode;a.classList.contains("clr-field")||((t=d.createElement("div")).innerHTML='',a.insertBefore(t,e),t.setAttribute("class","clr-field"),t.style.color=e.value,t.appendChild(e))})}function L(e){b&&(e&&m!==b.value&&b.dispatchEvent(new Event("change",{bubbles:!0})),f.classList.remove("clr-open"),b.focus({preventScroll:!0}),b=null)}function S(e){var t=function(e){a.fillStyle="#000",a.fillStyle=e,e=(e=/^((rgba)|rgb)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i.exec(a.fillStyle))?{r:+e[3],g:+e[4],b:+e[5],a:+e[6]}:(e=a.fillStyle.replace("#","").match(/.{2}/g).map(function(e){return parseInt(e,16)}),{r:e[0],g:e[1],b:e[2],a:1});return e}(e),e=function(e){var t=e.r/255,a=e.g/255,r=e.b/255,l=s.max(t,a,r),n=s.min(t,a,r),i=l-n,o=l,c=0,n=0;i&&(l===t&&(c=(a-r)/i),l===a&&(c=2+(r-t)/i),l===r&&(c=4+(t-a)/i),l&&(n=i/l));return{h:(c=s.floor(60*c))<0?c+360:c,s:s.round(100*n),v:s.round(100*o),a:e.a}}(t);T(e.s,e.v),C(t),c.value=e.h,f.style.color="hsl("+e.h+", 100%, 50%)",r.style.left=e.h/360*100+"%",i.style.left=v.width*e.s/100+"px",i.style.top=100-v.height*e.v/100+"px",p.value=100*e.a,g.style.left=100*e.a+"%"}function l(){b&&(b.value=y.value,b.dispatchEvent(new Event("input",{bubbles:!0})))}function A(e,t){e={h:+c.value,s:e/v.width*100,v:100-t/v.height*100,a:p.value/100},t=function(e){var t=e.s/100,a=e.v/100,r=t*a,l=e.h/60,n=r*(1-s.abs(l%2-1)),i=a-r;r+=i,n+=i;t=s.floor(l)%6,a=[r,n,i,i,n,r][t],l=[n,r,r,n,i,i][t],t=[i,i,n,r,r,n][t];return{r:s.round(255*a),g:s.round(255*l),b:s.round(255*t),a:e.a}}(e);T(e.s,e.v),C(t),l()}function T(e,t){var a=k.a11y.marker;e=+e.toFixed(1),t=+t.toFixed(1),a=(a=a.replace("{s}",e)).replace("{v}",t),i.setAttribute("aria-label",a)}function t(e){var t={pageX:((a=e).changedTouches?a.changedTouches[0]:a).pageX,pageY:(a.changedTouches?a.changedTouches[0]:a).pageY},a=t.pageX-v.x,t=t.pageY-v.y;k.parent&&(t+=k.parent.scrollTop),a=a<0?0:a>v.width?v.width:a,t=t<0?0:t>v.height?v.height:t,i.style.left=a+"px",i.style.top=t+"px",A(a,t),e.preventDefault(),e.stopPropagation()}function C(e){for(var t in e)w[t]=e[t];var a,r=function(e){var t=e.r.toString(16),a=e.g.toString(16),r=e.b.toString(16),l="";e.r<16&&(t="0"+t);e.g<16&&(a="0"+a);e.b<16&&(r="0"+r);e.a<1&&(e=255*e.a|0,l=e.toString(16),e<16&&(l="0"+l));return"#"+t+a+r+l}(w),l=r.substring(0,7),n=1===(a=w).a?"rgb("+a.r+","+a.g+","+a.b+")":"rgba("+a.r+","+a.g+","+a.b+","+a.a+")";switch(i.style.color=l,g.parentNode.style.color=l,g.style.color=r,o.style.color=r,y.value=r,h.style.display="none",h.offsetHeight,h.style.display="",g.nextElementSibling.style.display="none",g.nextElementSibling.offsetHeight,g.nextElementSibling.style.display="",k.format){case"mixed":if(1===w.a)break;case"rgb":y.value=n}}function e(){var e=+c.value,t=+i.style.left.replace("px",""),a=+i.style.top.replace("px","");f.style.color="hsl("+e+", 100%, 50%)",r.style.left=e/360*100+"%",A(t,a)}function H(){var e=p.value/100;g.style.left=100*e+"%",C({a:e}),l()}function N(e){return d.getElementById(e)}function D(e,t,a,r){var l=Element.prototype.matches||Element.prototype.msMatchesSelector;"string"==typeof a?e.addEventListener(t,function(e){l.call(e.target,a)&&r.call(e.target,e)}):(r=a,e.addEventListener(t,r))}function M(e,t){t=void 0!==t?t:[],"loading"!==d.readyState?e.apply(void 0,t):d.addEventListener("DOMContentLoaded",function(){e.apply(void 0,t)})}void 0!==NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),u.Coloris=function(){var l={set:n,wrap:E,close:L};function e(e){M(function(){e&&("string"==typeof e?x:n)(e)})}for(var t in l)!function(r){e[r]=function(){for(var e=arguments.length,t=new Array(e),a=0;a
    ",d.body.appendChild(f),h=N("clr-color-area"),i=N("clr-color-marker"),o=N("clr-color-preview"),y=N("clr-color-value"),c=N("clr-hue-slider"),r=N("clr-hue-marker"),p=N("clr-alpha-slider"),g=N("clr-alpha-marker"),x(k.el),E(k.el),D(f,"mousedown",function(e){f.classList.remove("clr-keyboard-nav"),e.stopPropagation()}),D(h,"mousedown",function(e){D(d,"mousemove",t)}),D(h,"touchstart",function(e){d.addEventListener("touchmove",t,{passive:!1})}),D(i,"mousedown",function(e){D(d,"mousemove",t)}),D(i,"touchstart",function(e){d.addEventListener("touchmove",t,{passive:!1})}),D(y,"change",function(e){S(y.value),l()}),D(o,"click",function(e){L(!0)}),D(f,"click",".clr-swatches button",function(e){S(e.target.style.color),l()}),D(d,"mouseup",function(e){d.removeEventListener("mousemove",t)}),D(d,"touchend",function(e){d.removeEventListener("touchmove",t)}),D(d,"mousedown",function(e){f.classList.remove("clr-keyboard-nav"),L(!0)}),D(d,"keydown",function(e){"Escape"===e.key?L(!0):"Tab"===e.key&&f.classList.add("clr-keyboard-nav")}),D(d,"click",".clr-field button",function(e){e.target.nextElementSibling.dispatchEvent(new Event("click",{bubbles:!0}))}),D(i,"keydown",function(e){var t={ArrowUp:[0,-1],ArrowDown:[0,1],ArrowLeft:[-1,0],ArrowRight:[1,0]};-1!==Object.keys(t).indexOf(e.key)&&(!function(e,t){e=+i.style.left.replace("px","")+e,t=+i.style.top.replace("px","")+t,i.style.left=e+"px",i.style.top=t+"px",A(e,t)}.apply(void 0,t[e.key]),e.preventDefault())}),D(h,"click",t),D(c,"input",e),D(p,"input",H)})}(window,document,Math); \ No newline at end of file diff --git a/admin/js/group.js b/admin/js/group.js new file mode 100644 index 0000000..464b454 --- /dev/null +++ b/admin/js/group.js @@ -0,0 +1,146 @@ +function listTable(query){ + var url = window.document.location.href.toString(); + var queryString = url.split("?")[1]; + query = query || queryString; + layer.closeAll(); + var ii = layer.load(2, {shade:[0.1,'#fff']}); + $.ajax({ + type : 'GET', + url : 'table_group.php?'+query, + dataType : 'html', + cache : false, + success : function(data) { + layer.close(ii); + $("#listTable").html(data); + }, + error:function(data){ + layer.msg('服务器错误'); + lightyear.loading('hide'); + return false; + } + }); +} + +//载入页面 +$(document).ready(function(){ + if($("#listTable").length>0){ + listTable() + } +}); +$(document).on('click', '.sort-up', function(){ + //上移 + if($(this).parents('tr').prevAll().length > 0){ + $(this).parents('tr').prev().before($(this).parents('tr').prop('outerHTML')); + $(this).parents('tr').remove(); + save_order(); + } +}).on('click', '.sort-down', function(){ + //下移 + if($(this).parents('tr').nextAll().length > 0){ + $(this).parents('tr').next().after($(this).parents('tr').prop('outerHTML')); + $(this).parents('tr').remove(); + save_order(); + } +}); +//保存排序 +function save_order(){ + var groups =[]; + var $inputArr = $('input[name="group_id"]'); + $inputArr.each(function(){ + groups.push($(this).val()); + }); + + lightyear.loading('show'); + $.ajax({ + url:"group.php?set=sort", + method:"POST", + data:{groups:groups}, + success:function(data){ + lightyear.loading('hide'); + lightyear.notify('操作成功!', 'success', 1000); + listTable(); + return true; + }, + error:function(data){ + layer.msg('服务器错误'); + lightyear.loading('hide'); + return false; + } + }); +} + +//启用分组 +function on_group(id){ + lightyear.loading('show'); + $.ajax({ + url:"group.php?set=on", + method:"POST", + data:{group_id:id}, + success:function(data){ + lightyear.loading('hide'); + lightyear.notify('操作成功!', 'success', 1000); + listTable(); + return true; + }, + error:function(data){ + layer.msg('服务器错误'); + lightyear.loading('hide'); + return false; + } + }); +} +//禁用分组 +function off_group(id){ + lightyear.loading('show'); + $.ajax({ + url:"group.php?set=off", + method:"POST", + data:{group_id:id}, + success:function(data){ + lightyear.loading('hide'); + lightyear.notify('操作成功!', 'success', 1000); + listTable(); + return true; + }, + error:function(data){ + layer.msg('服务器错误'); + lightyear.loading('hide'); + return false; + } + }); +} + +//删除分组 +function del_group(id) { + $.confirm({ + title: '警告', + content: '删除分组会同时删除该分组下的所有链接,该操作不可逆!
    是否继续?', + type: 'red', + typeAnimated: true, + buttons: { + tryAgain: { + text: '确定', + btnClass: 'btn-red', + action: function(){ + lightyear.loading('show'); + $.ajax({ + url:"group.php?set=del", + method:"POST", + data:{ + group_id:id + }, + success:function(data){ + lightyear.loading('hide'); + lightyear.notify('操作成功!', 'success', 1000); + listTable(); + return true; + } + }); + } + }, + close: { + text: '取消' + } + } + }); +} \ No newline at end of file diff --git a/admin/js/jquery.dragsort-0.5.2.min.js b/admin/js/jquery.dragsort-0.5.2.min.js new file mode 100644 index 0000000..5a72248 --- /dev/null +++ b/admin/js/jquery.dragsort-0.5.2.min.js @@ -0,0 +1,3 @@ +// jQuery List DragSort v0.5.2 +// License: http://dragsort.codeplex.com/license +(function(e){e.fn.dragsort=function(t){if(t=="destroy"){e(this.selector).trigger("dragsort-uninit");return}var n=e.extend({},e.fn.dragsort.defaults,t);var r=[];var i=null,s=null;this.each(function(t,o){if(e(o).is("table")&&e(o).children().size()==1&&e(o).children().is("tbody"))o=e(o).children().get(0);var u={draggedItem:null,placeHolderItem:null,pos:null,offset:null,offsetLimit:null,scroll:null,container:o,init:function(){n.tagName=e(this.container).children().size()==0?"li":e(this.container).children().get(0).tagName.toLowerCase();if(n.itemSelector=="")n.itemSelector=n.tagName;if(n.dragSelector=="")n.dragSelector=n.tagName;if(n.placeHolderTemplate=="")n.placeHolderTemplate="<"+n.tagName+"> ";e(this.container).attr("data-listidx",t).mousedown(this.grabItem).bind("dragsort-uninit",this.uninit);this.styleDragHandlers(true)},uninit:function(){var t=r[e(this).attr("data-listidx")];e(t.container).unbind("mousedown",t.grabItem).unbind("dragsort-uninit");t.styleDragHandlers(false)},getItems:function(){return e(this.container).children(n.itemSelector)},styleDragHandlers:function(t){this.getItems().map(function(){return e(this).is(n.dragSelector)?this:e(this).find(n.dragSelector).get()}).css("cursor",t?"pointer":"")},grabItem:function(t){var i=r[e(this).attr("data-listidx")];var s=e(t.target).closest("[data-listidx] > "+n.tagName).get(0);var o=i.getItems().filter(function(){return this==s}).size()>0;if(t.which!=1||e(t.target).is(n.dragSelectorExclude)||e(t.target).closest(n.dragSelectorExclude).size()>0||!o)return;t.preventDefault();var u=t.target;while(!e(u).is(n.dragSelector)){if(u==this)return;u=u.parentNode}e(u).attr("data-cursor",e(u).css("cursor"));e(u).css("cursor","move");var a=this;var f=function(){i.dragStart.call(a,t);e(i.container).unbind("mousemove",f)};e(i.container).mousemove(f).mouseup(function(){e(i.container).unbind("mousemove",f);e(u).css("cursor",e(u).attr("data-cursor"))})},dragStart:function(t){if(i!=null&&i.draggedItem!=null)i.dropItem();i=r[e(this).attr("data-listidx")];i.draggedItem=e(t.target).closest("[data-listidx] > "+n.tagName);i.draggedItem.attr("data-origpos",e(this).attr("data-listidx")+"-"+e(i.container).children().index(i.draggedItem));var s=parseInt(i.draggedItem.css("marginTop"));var o=parseInt(i.draggedItem.css("marginLeft"));i.offset=i.draggedItem.offset();i.offset.top=t.pageY-i.offset.top+(isNaN(s)?0:s)-1;i.offset.left=t.pageX-i.offset.left+(isNaN(o)?0:o)-1;if(!n.dragBetween){var u=e(i.container).outerHeight()==0?Math.max(1,Math.round(.5+i.getItems().size()*i.draggedItem.outerWidth()/e(i.container).outerWidth()))*i.draggedItem.outerHeight():e(i.container).outerHeight();i.offsetLimit=e(i.container).offset();i.offsetLimit.right=i.offsetLimit.left+e(i.container).outerWidth()-i.draggedItem.outerWidth();i.offsetLimit.bottom=i.offsetLimit.top+u-i.draggedItem.outerHeight()}var a=i.draggedItem.height();var f=i.draggedItem.width();if(n.tagName=="tr"){i.draggedItem.children().each(function(){e(this).width(e(this).width())});i.placeHolderItem=i.draggedItem.clone().attr("data-placeholder",true);i.draggedItem.after(i.placeHolderItem);i.placeHolderItem.children().each(function(){e(this).css({borderWidth:0,width:e(this).width()+1,height:e(this).height()+1}).html(" ")})}else{i.draggedItem.after(n.placeHolderTemplate);i.placeHolderItem=i.draggedItem.next().css({height:a,width:f}).attr("data-placeholder",true)}if(n.tagName=="td"){var l=i.draggedItem.closest("table").get(0);e("
    ").appendTo("body").children().append(i.draggedItem)}var c=i.draggedItem.attr("style");i.draggedItem.attr("data-origstyle",c?c:"");i.draggedItem.css({position:"absolute",opacity:.8,"z-index":999,height:a,width:f});i.scroll={moveX:0,moveY:0,maxX:e(document).width()-e(window).width(),maxY:e(document).height()-e(window).height()};i.scroll.scrollY=window.setInterval(function(){if(n.scrollContainer!=window){e(n.scrollContainer).scrollTop(e(n.scrollContainer).scrollTop()+i.scroll.moveY);return}var t=e(n.scrollContainer).scrollTop();if(i.scroll.moveY>0&&t0){e(n.scrollContainer).scrollTop(t+i.scroll.moveY);i.draggedItem.css("top",i.draggedItem.offset().top+i.scroll.moveY+1)}},10);i.scroll.scrollX=window.setInterval(function(){if(n.scrollContainer!=window){e(n.scrollContainer).scrollLeft(e(n.scrollContainer).scrollLeft()+i.scroll.moveX);return}var t=e(n.scrollContainer).scrollLeft();if(i.scroll.moveX>0&&t0){e(n.scrollContainer).scrollLeft(t+i.scroll.moveX);i.draggedItem.css("left",i.draggedItem.offset().left+i.scroll.moveX+1)}},10);e(r).each(function(e,t){t.createDropTargets();t.buildPositionTable()});i.setPos(t.pageX,t.pageY);e(document).bind("mousemove",i.swapItems);e(document).bind("mouseup",i.dropItem);if(n.scrollContainer!=window)e(window).bind("wheel",i.wheel)},setPos:function(t,r){var s=r-this.offset.top;var o=t-this.offset.left;if(!n.dragBetween){s=Math.min(this.offsetLimit.bottom,Math.max(s,this.offsetLimit.top));o=Math.min(this.offsetLimit.right,Math.max(o,this.offsetLimit.left))}var u=this.draggedItem.offsetParent().not("body").offset();if(u!=null){s-=u.top;o-=u.left}if(n.scrollContainer==window){r-=e(window).scrollTop();t-=e(window).scrollLeft();r=Math.max(0,r-e(window).height()+5)+Math.min(0,r-5);t=Math.max(0,t-e(window).width()+5)+Math.min(0,t-5)}else{var a=e(n.scrollContainer);var f=a.offset();r=Math.max(0,r-a.height()-f.top)+Math.min(0,r-f.top);t=Math.max(0,t-a.width()-f.left)+Math.min(0,t-f.left)}i.scroll.moveX=t==0?0:t*n.scrollSpeed/Math.abs(t);i.scroll.moveY=r==0?0:r*n.scrollSpeed/Math.abs(r);this.draggedItem.css({top:s,left:o})},wheel:function(t){if(i&&n.scrollContainer!=window){var r=e(n.scrollContainer);var s=r.offset();t=t.originalEvent;if(t.clientX>s.left&&t.clientXs.top&&t.clientY0)o.before(i.draggedItem);else if(s[1]==0)e(r[s[0]].container).prepend(i.draggedItem);else e(r[s[0]].container).append(i.draggedItem)}i.draggedItem.removeAttr("data-origpos");i.draggedItem=null;e(document).unbind("mousemove",i.swapItems);e(document).unbind("mouseup",i.dropItem);if(n.scrollContainer!=window)e(window).unbind("wheel",i.wheel);return false},swapItems:function(t){if(i.draggedItem==null)return false;i.setPos(t.pageX,t.pageY);var o=i.findPos(t.pageX,t.pageY);var u=i;for(var a=0;o==-1&&n.dragBetween&&ai.draggedItem.offset().top||s.left>i.draggedItem.offset().left)e(u.pos[o].elm).before(i.placeHolderItem);else e(u.pos[o].elm).after(i.placeHolderItem);l.each(function(){var t=f().eq(this.idx).get(0);if(this!=t&&f().index(this)e&&this.pos[n].topt)return n}return-1},createDropTargets:function(){if(!n.dragBetween)return;e(r).each(function(){var t=e(this.container).find("[data-placeholder]");var r=e(this.container).find("[data-droptarget]");if(t.size()>0&&r.size()>0)r.remove();else if(t.size()==0&&r.size()==0){if(n.tagName=="td")e(n.placeHolderTemplate).attr("data-droptarget",true).appendTo(this.container);else e(this.container).append(i.placeHolderItem.removeAttr("data-placeholder").clone().attr("data-droptarget",true));i.placeHolderItem.attr("data-placeholder",true)}})}};u.init();r.push(u)});return this};e.fn.dragsort.defaults={itemSelector:"",dragSelector:"",dragSelectorExclude:"input, textarea",dragEnd:function(){},dragBetween:false,placeHolderTemplate:"",scrollContainer:window,scrollSpeed:5}})(jQuery) diff --git a/admin/js/jquery.min.js b/admin/js/jquery.min.js new file mode 100644 index 0000000..8387d34 --- /dev/null +++ b/admin/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){ +return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!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(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*\s*$/g,ia={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(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=ja(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?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(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,n.cleanData(oa(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,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("

    +

    同意协议并开始安装

    + + + +
    +
    +

    环境检查

    +
    +
    +
    + 10% +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    函数检测需求当前用途
    PHP 5.4及以上必须')?''.PHP_VERSION.'':''.PHP_VERSION.''; ?>PHP版本支持
    PDO必须数据库连接
    file_get_contents()必须读取文件
    session必须可用':'不支持'; ?>PHP必备功能
    +

    <<上一步 +下一步>>

    +
    + + +
    +
    +

    数据库配置

    +
    +
    +
    + 30% +
    +
    +
    + + + + + + + + + + + +
    +
    + (如果已事先填写好config.php相关数据库配置,请 点击此处 跳过这一步!) +HTML; +?> +
    +
    + + +
    +
    +

    保存数据库

    +
    +
    +
    + 50% +
    +
    +
    +请先填写好数据库并保存后再安装!
    << 返回上一页
    '; + } else { + if(!$con=mysqli_connect($dbconfig['host'],$dbconfig['user'],$dbconfig['pwd'],$dbconfig['dbname'],$dbconfig['port'])){ + if(mysqli_connect_errno()==2002) + echo '
    连接数据库失败,数据库地址填写错误!
    '; + elseif(mysqli_connect_errno()==1045) + echo '
    连接数据库失败,数据库用户名或密码填写错误!
    '; + elseif(mysqli_connect_errno()==1049) + echo '
    连接数据库失败,数据库名不存在!
    '; + else + echo '
    连接数据库失败,['.mysqli_connect_errno().']'.mysqli_connect_error().'
    '; + }elseif(version_compare(mysqli_get_server_info($con), '5.5.3', '<')){ + echo '
    MySQL数据库版本太低,需要MySQL 5.6或以上版本!
    '; + }else{ + echo '
    数据库配置文件保存成功!
    '; + if(mysqli_query($con, "select * from lylme_config where 1")==FALSE) + echo '

    创建数据表>>

    '; + else + echo '
    系统检测到你已安装过六零导航页
    + + '; + } + } +}else{ + $db_host=isset($_POST['db_host'])?$_POST['db_host']:NULL; + $db_port=isset($_POST['db_port'])?$_POST['db_port']:NULL; + $db_user=isset($_POST['db_user'])?$_POST['db_user']:NULL; + $db_pwd=isset($_POST['db_pwd'])?$_POST['db_pwd']:NULL; + $db_name=isset($_POST['db_name'])?$_POST['db_name']:NULL; + + if($db_host==null || $db_port==null || $db_user==null || $db_pwd==null || $db_name==null){ + echo '
    保存错误,请确保每项都不为空
    << 返回上一页
    '; + } else { + $config=' "'.$db_host.'", //数据库服务器 + "port" => '.$db_port.', //数据库端口 + "user" => "'.$db_user.'", //数据库用户名 + "pwd" => "'.$db_pwd.'", //数据库密码 + "dbname" => "'.$db_name.'", //数据库名 +); +?>'; + if(!$con=mysqli_connect($db_host,$db_user,$db_pwd,$db_name,$db_port)){ + if(mysqli_connect_errno()==2002) + echo '
    连接数据库失败,数据库地址填写错误!
    '; + elseif(mysqli_connect_errno()==1045) + echo '
    连接数据库失败,数据库用户名或密码填写错误!
    '; + elseif(mysqli_connect_errno()==1044) + echo '
    连接数据库失败,数据库名填写错误!
    '; + elseif(mysqli_connect_errno()==1049) + echo '
    连接数据库失败,数据库名不存在!
    '; + else + echo '
    连接数据库失败,['.mysqli_connect_errno().']'.mysqli_connect_error().'
    '; + }elseif(version_compare(mysqli_get_server_info($con), '5.5.3', '<')){ + echo '
    MySQL数据库版本太低,需要MySQL 5.6或以上版本!
    '; + }elseif(file_put_contents('../config.php',$config)){ + if(function_exists("opcache_reset"))@opcache_reset(); + echo '
    数据库配置文件保存成功!
    '; + if(mysqli_query($con, "select * from lylme_config where 1")==FALSE) + echo '

    创建数据表>>

    '; + else + echo '
    系统检测到你已安装过六零导航页
    + + '; + }else + echo '
    保存失败,请确保网站根目录有写入权限
    << 返回上一页
    '; + } +} +?> +
    + + +
    +
    +

    创建数据表

    +
    +
    +
    + 70% +
    +
    +
    +请先填写好数据库并保存后再安装!
    << 返回上一页
    '; +} else { + date_default_timezone_set("PRC"); + $date = date("Y-m-d"); + $sql=file_get_contents("install.sql"); + $sql=explode(';',$sql); + $sql[] = "INSERT INTO `lylme_config` VALUES ('build', '".$date."', '建站日期')"; + $cn = mysqli_connect($dbconfig['host'],$dbconfig['user'],$dbconfig['pwd'],$dbconfig['dbname'],$dbconfig['port']); + if (!$cn) die('链接数据库失败:['.mysqli_connect_errno().']'.mysqli_connect_error()); + mysqli_query($cn, "set sql_mode = ''"); + mysqli_query($cn, "set names utf8"); + $t=0; $e=0; $error=''; + for($i=0;$i'; + } + } +} +if($e==0) { + echo '
    安装成功!
    SQL成功'.$t.'句/失败'.$e.'句

    下一步>>

    '; +} else { + echo '
    安装失败
    SQL成功'.$t.'句/失败'.$e.'句
    错误信息:'.$error.'

    点此进行重试

    '; +} +?> +
    + + + +
    +
    +

    安装完成

    +
    +
    +
    + 100% +
    +
    +
    +array('method'=>"GET",'timeout'=>10)))); + @file_put_contents("install.lock",'安装锁'); + echo '
    安装完成!管理账号和密码是:admin/123456

    >>网站首页>>后台管理
    更多设置选项请登录后台管理进行修改。

    如果你的空间不支持本地文件读写,请自行在install/ 目录建立 install.lock 文件!
    '; +?> +
    + + + + +
    +
    +

    安装完成

    +
    +
    +
    + 100% +
    +
    +
    +安装完成!管理账号和密码是:admin/123456

    >>网站首页>>后台管理
    更多设置选项请登录后台管理进行修改。

    如果你的空间不支持本地文件读写,请自行在install/ 目录建立 install.lock 文件!
    '; +?> +
    + + + + + + + \ No newline at end of file diff --git a/install/install.sql b/install/install.sql new file mode 100644 index 0000000..ce131b7 --- /dev/null +++ b/install/install.sql @@ -0,0 +1,244 @@ +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8 */; +/*!50503 SET NAMES utf8mb4 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + +DROP TABLE IF EXISTS `lylme_apply`; +CREATE TABLE IF NOT EXISTS `lylme_apply` ( + `apply_id` int(4) NOT NULL AUTO_INCREMENT, + `apply_name` varchar(20) NOT NULL, + `apply_url` varchar(255) NOT NULL, + `apply_group` int(2) NOT NULL, + `apply_icon` text NOT NULL, + `apply_mail` varchar(30) NOT NULL, + `apply_time` datetime NOT NULL, + `apply_status` int(11) NOT NULL, + PRIMARY KEY (`apply_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='收录申请'; + +DELETE FROM `lylme_apply`; +/*!40000 ALTER TABLE `lylme_apply` DISABLE KEYS */; +/*!40000 ALTER TABLE `lylme_apply` ENABLE KEYS */; + +DROP TABLE IF EXISTS `lylme_config`; +CREATE TABLE IF NOT EXISTS `lylme_config` ( + `k` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '键', + `v` text COLLATE utf8mb4_unicode_ci COMMENT '值', + `description` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '描述', + PRIMARY KEY (`k`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='导航配置'; + +DELETE FROM `lylme_config`; +/*!40000 ALTER TABLE `lylme_config` DISABLE KEYS */; +INSERT INTO `lylme_config` (`k`, `v`, `description`) VALUES + ('admin_user', 'admin', '管理员账号'), + ('admin_pwd', '123456', '管理员密码'), + ('apply', '0', '收录申请'), + ('apply_gg', '收录说明:
    1. 禁止提交违规违法站点
    2. 页面整洁,无多个弹窗广告和恶意跳转
    3. 非盈利性网站,网站正常访问
    4. 添加本站友链或网站已ICP备案优先收录
    ', '收录公告'), + ('background', './assets/img/background.jpg', '背景图片'), + ('cdnpublic', NULL, 'CDN地址'), + ('copyright', 'Copyright ©2022 LyLme Spage. All Rights Reserved.', '版权代码'), + ('description', '六零导航页(LyLme Spage)致力于简洁高效无广告的上网导航和搜索入口,沉淀最具价值链接,全站无商业推广,简约而不简单。', '网站描述'), + ('home-title', '

    上网,从这里开始!

    ', '首页标题'), + ('icp', '', '备案号'), + ('keywords', '六零导航页,百度搜索,哔哩哔哩搜索,知乎搜索,六零导航,LyLme Spage,六零,LyLme,网站导航,上网导航', '关键字'), + ('logo', './assets/img/logo.png', '网站图标'), + ('template', 'default', '网站模板'), + ('title', '上网导航 - LyLme Spage', '网站名称'), + ('tq', 'true', '天气显示开关'), + ('version', 'v1.3.0', '程序版本'), + ('wap_background', NULL, '手机端背景'), + ('wztj', '', '网站统计代码'), + ('yan', 'true', '随机一言开关'); +/*!40000 ALTER TABLE `lylme_config` ENABLE KEYS */; + +DROP TABLE IF EXISTS `lylme_groups`; +CREATE TABLE IF NOT EXISTS `lylme_groups` ( + `group_id` int(2) NOT NULL AUTO_INCREMENT COMMENT '分组ID', + `group_name` varchar(10) NOT NULL COMMENT '分组名称', + `group_icon` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '分组图标', + `group_order` int(4) NOT NULL DEFAULT '5' COMMENT '分组排序', + `group_status` int(1) NOT NULL DEFAULT '1' COMMENT '分组状态', + `group_pwd` int(2) NOT NULL DEFAULT '0' COMMENT '加密组ID', + PRIMARY KEY (`group_id`) USING BTREE, + UNIQUE KEY `group_name` (`group_name`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT; + +DELETE FROM `lylme_groups`; +/*!40000 ALTER TABLE `lylme_groups` DISABLE KEYS */; +INSERT INTO `lylme_groups` (`group_id`, `group_name`, `group_icon`, `group_order`, `group_status`, `group_pwd`) VALUES + (1, '常用导航', '', 1, 1, 0), + (2, '设计视觉', '', 2, 1, 0), + (3, '社交&存储', '', 3, 1, 0), + (4, '工具', '', 4, 1, 0), + (5, '开发', '', 5, 1, 0), + (6, '游戏娱乐', '', 6, 1, 0), + (7, '网站公告', '', 7, 1, 0); +/*!40000 ALTER TABLE `lylme_groups` ENABLE KEYS */; + +DROP TABLE IF EXISTS `lylme_links`; +CREATE TABLE IF NOT EXISTS `lylme_links` ( + `id` int(4) NOT NULL AUTO_INCREMENT COMMENT '网站ID', + `name` varchar(20) NOT NULL COMMENT '链接标题', + `group_id` int(2) NOT NULL DEFAULT '1' COMMENT '分组名称', + `url` varchar(255) NOT NULL COMMENT '链接地址', + `icon` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '链接图标', + `PS` varchar(255) DEFAULT NULL COMMENT '备注', + `link_order` int(4) DEFAULT '10' COMMENT '链接排序', + `link_status` int(1) NOT NULL DEFAULT '1' COMMENT '链接状态', + `link_pwd` int(2) DEFAULT '0' COMMENT '加密组ID', + PRIMARY KEY (`id`) USING BTREE, + KEY `组` (`group_id`) USING BTREE, + CONSTRAINT `组` FOREIGN KEY (`group_id`) REFERENCES `lylme_groups` (`group_id`) +) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT; + +DELETE FROM `lylme_links`; +/*!40000 ALTER TABLE `lylme_links` DISABLE KEYS */; +INSERT INTO `lylme_links` (`id`, `name`, `group_id`, `url`, `icon`, `PS`, `link_order`, `link_status`, `link_pwd`) VALUES + (1, '百度', 1, 'https://www.baidu.com/', '', NULL, 10, 1, 0), + (2, '腾讯视频', 1, 'https://v.qq.com', '', NULL, 10, 1, 0), + (3, '优酷', 1, 'https://www.youku.com/', '', NULL, 10, 1, 0), + (4, '爱奇艺', 1, 'https://www.iqiyi.com/', '', NULL, 10, 1, 0), + (5, '淘宝', 1, 'https://www.taobao.com/', '', NULL, 10, 1, 0), + (6, '哔哩哔哩', 1, 'https://www.bilibili.com/', '', NULL, 10, 1, 0), + (7, '微博', 1, 'https://www.weibo.com/', '', NULL, 10, 1, 0), + (8, 'QQ邮箱', 1, 'https://mail.qq.com/', '', NULL, 10, 1, 0), + (9, '百度贴吧', 1, 'https://tieba.baidu.com/', '', NULL, 10, 1, 0), + (10, 'CCTV直播', 1, 'https://tv.cctv.com/live/index.shtml', '', NULL, 10, 1, 0), + (11, '抖音网页版', 1, 'https://www.douyin.com/', '', NULL, 10, 1, 0), + (12, '快手网页版', 1, 'https://www.kuaishou.com/', '', NULL, 10, 1, 0), + (13, '网易云音乐', 1, 'https://music.163.com/', '', NULL, 10, 1, 0), + (14, 'QQ音乐', 1, 'https://y.qq.com/', '', NULL, 10, 1, 0), + (15, '酷狗音乐', 1, 'https://www.kugou.com/', '', NULL, 10, 1, 0), + (16, '虎牙直播', 1, 'https://www.huya.com/', '', NULL, 10, 1, 0), + (17, '斗鱼直播', 1, 'https://www.douyu.com/', '', NULL, 10, 1, 0), + (18, '企鹅电竞', 1, 'https://egame.qq.com/', '', NULL, 10, 1, 0), + (19, '微信文件传输助手', 1, 'https://filehelper.weixin.qq.com/', '', NULL, 10, 1, 0), + (20, '六零', 1, 'https://www.lylme.com/', '', NULL, 10, 1, 0), + (21, 'Office模板', 2, 'https://www.officeplus.cn/', '', NULL, 10, 1, 0), + (22, '搞定设计', 2, 'https://www.gaoding.com/', '', NULL, 10, 1, 0), + (23, '素材天下', 2, 'http://www.sucaitianxia.net/', '', NULL, 10, 1, 0), + (24, '千库网', 2, 'https://588ku.com/', '', NULL, 10, 1, 0), + (25, '图怪兽', 2, 'https://818ps.com', '', NULL, 10, 1, 0), + (26, '站酷', 2, 'https://www.zcool.com.cn/', '', NULL, 10, 1, 0), + (27, '阿里图标', 2, 'https://www.iconfont.cn/', '', NULL, 10, 1, 0), + (28, 'IconFinder', 2, 'https://www.iconfinder.com/', '', NULL, 10, 1, 0), + (29, '优设教程', 2, 'https://uiiiuiii.com/', '', NULL, 10, 1, 0), + (30, '知乎', 3, 'https://www.zhihu.com/explore', '', NULL, 10, 1, 0), + (31, '豆瓣', 3, 'https://www.douban.com/', '', NULL, 10, 1, 0), + (32, '简书', 3, 'https://www.jianshu.com/', '', NULL, 10, 1, 0), + (33, '阿里云盘', 3, 'https://www.aliyundrive.com/', '', NULL, 10, 1, 0), + (34, '百度网盘', 3, 'https://pan.baidu.com/', '', NULL, 10, 1, 0), + (35, '蓝奏云', 3, 'https://www.lanzou.com/', '', NULL, 10, 1, 0), + (36, '迅雷云盘', 3, 'https://pan.xunlei.com/', '', NULL, 10, 1, 0), + (37, 'OneDrive', 3, 'https://onedrive.live.com/', '', NULL, 10, 1, 0), + (38, '天翼云盘', 3, 'https://cloud.189.cn/', '', NULL, 10, 1, 0), + (39, 'UC网盘', 3, 'https://www.yun.cn/', '', NULL, 10, 1, 0), + (40, 'QQ邮箱', 3, 'https://mail.qq.com/', '', NULL, 10, 1, 0), + (41, 'Gmail', 3, 'https://mail.google.com/', '', NULL, 10, 1, 0), + (42, 'Hotmail', 3, 'https://outlook.live.com/mail/', '', NULL, 10, 1, 0), + (43, '网易邮箱', 3, 'https://mail.163.com/', '', NULL, 10, 1, 0), + (44, '新浪邮箱', 3, 'https://mail.sina.com.cn/', '', NULL, 10, 1, 0), + (45, '阿里邮箱', 3, 'https://mail.aliyun.com/', '', NULL, 10, 1, 0), + (46, '在线工具', 4, 'https://tool.lu/', '', NULL, 10, 1, 0), + (47, 'IP查询', 4, 'https://ip.cn/', '', NULL, 10, 1, 0), + (48, '文档在线转换', 4, 'https://xpdf.net/', '', NULL, 10, 1, 0), + (49, '谷歌翻译', 4, 'https://translate.google.cn/?hl=zh-CN', '', NULL, 10, 1, 0), + (50, '有道翻译', 4, 'https://fanyi.youdao.com/', '', NULL, 10, 1, 0), + (51, 'HTML在线运行', 4, 'https://c.runoob.com/front-end/61/', '', NULL, 10, 1, 0), + (52, 'MD编辑器', 4, 'https://www.lylme.com/html/', '', NULL, 10, 1, 0), + (53, '微PE工具', 4, 'http://www.wepe.com.cn/', '', NULL, 10, 1, 0), + (54, '在线代码格式化', 4, 'https://tool.oschina.net/codeformat/html/', '', NULL, 10, 1, 0), + (55, 'JS混淆器', 4, 'http://tool.chinaz.com/tools/jscodeconfusion.aspx', '', NULL, 10, 1, 0), + (56, '站长工具', 4, 'http://tool.chinaz.com/', '', NULL, 10, 1, 0), + (57, '在线Ping', 4, 'https://ping.chinaz.com/', '', NULL, 10, 1, 0), + (58, 'ICP备案查询', 4, 'https://icp.chinaz.com/', '', NULL, 10, 1, 0), + (59, '在线PS', 4, 'https://www.photopea.com/', '', NULL, 10, 1, 0), + (60, 'W3school', 5, 'http://www.w3school.com.cn/', '', NULL, 10, 1, 0), + (61, 'Github', 5, 'https://github.com/', '', NULL, 10, 1, 0), + (62, '码云Gitee', 5, 'https://gitee.com/', '', NULL, 10, 1, 0), + (63, 'Linux命令查询', 5, 'https://linux.lylme.com/', '', NULL, 10, 1, 0), + (64, 'CSDN', 5, 'https://www.csdn.net/', '', NULL, 10, 1, 0), + (65, 'CdnJs', 5, 'https://cdnjs.com/', '', NULL, 10, 1, 0), + (66, '字节跳动CDN', 5, 'https://cdn.bytedance.com/', '', NULL, 10, 1, 0), + (67, 'Font Awesome', 5, 'https://fontawesome.com/icons?https://fontawesome.com/', '', NULL, 10, 1, 0), + (68, 'MSDN我告诉你', 5, 'https://msdn.itellyou.cn/', '', NULL, 10, 1, 0), + (69, '腾讯云', 5, 'https://cloud.tencent.com/', '', NULL, 10, 1, 0), + (70, '阿里云', 5, 'https://www.aliyun.com/', '', NULL, 10, 1, 0), + (71, '4399小游戏', 6, 'http://www.4399.com/', '', NULL, 10, 1, 0), + (72, '7k7k小游戏', 6, 'http://www.7k7k.com/', '', NULL, 10, 1, 0), + (73, '英雄联盟', 6, 'https://lol.qq.com/', '', NULL, 10, 1, 0), + (74, '永劫无间', 6, 'https://www.yjwujian.cn/', '', NULL, 10, 1, 0), + (75, 'STEAM', 6, 'https://store.steampowered.com/', '', NULL, 10, 1, 0), + (76, '王者荣耀', 6, 'https://pvp.qq.com/', '', NULL, 10, 1, 0), + (77, '3DM GAME', 6, 'https://www.3dmgame.com/', '', NULL, 10, 1, 0), + (78, '官方主页', 7, 'https://www.lylme.com/', '', NULL, 10, 1, 0), + (79, '申请收录', 7, '/apply', '', NULL, 10, 1, 0), + (80, '建议&反馈', 7, 'https://support.qq.com/products/356339', '', NULL, 10, 1, 0); +/*!40000 ALTER TABLE `lylme_links` ENABLE KEYS */; + +DROP TABLE IF EXISTS `lylme_pwd`; +CREATE TABLE IF NOT EXISTS `lylme_pwd` ( + `pwd_id` int(2) NOT NULL AUTO_INCREMENT COMMENT '加密组ID', + `pwd_name` varchar(20) NOT NULL COMMENT '加密组名称', + `pwd_key` varchar(20) NOT NULL COMMENT '加密组密码', + `pwd_ps` varchar(30) DEFAULT NULL COMMENT '加密组备注', + PRIMARY KEY (`pwd_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DELETE FROM `lylme_pwd`; +/*!40000 ALTER TABLE `lylme_pwd` DISABLE KEYS */; +/*!40000 ALTER TABLE `lylme_pwd` ENABLE KEYS */; + +DROP TABLE IF EXISTS `lylme_sou`; +CREATE TABLE IF NOT EXISTS `lylme_sou` ( + `sou_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '搜索引擎ID', + `sou_alias` varchar(20) NOT NULL COMMENT '搜索引擎别名', + `sou_name` varchar(20) NOT NULL COMMENT '搜索引擎名称', + `sou_hint` varchar(30) NOT NULL DEFAULT '请输入搜索关键词' COMMENT '搜索引擎提示文字', + `sou_color` varchar(20) NOT NULL DEFAULT '#696a6d' COMMENT '搜索引擎字体颜色', + `sou_link` varchar(255) NOT NULL COMMENT '搜索引擎地址', + `sou_waplink` varchar(255) DEFAULT NULL COMMENT '搜索引擎移动端地址', + `sou_icon` text NOT NULL COMMENT '搜索引擎图标', + `sou_st` int(1) NOT NULL DEFAULT '1' COMMENT '搜索引擎开关', + `sou_order` int(2) NOT NULL COMMENT '搜索引擎排序', + PRIMARY KEY (`sou_id`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='搜索引擎'; + +DELETE FROM `lylme_sou`; +/*!40000 ALTER TABLE `lylme_sou` DISABLE KEYS */; +INSERT INTO `lylme_sou` (`sou_id`, `sou_alias`, `sou_name`, `sou_hint`, `sou_color`, `sou_link`, `sou_waplink`, `sou_icon`, `sou_st`, `sou_order`) VALUES + (1, 'baidu', '百度一下', '百度一下,你就知道', '#0c498c', 'https://www.baidu.com/s?word=', 'https://m.baidu.com/s?word=', '', 1, 1), + (2, 'sogou', '搜狗搜索', '上网从搜狗开始', '#696a6d', 'https://www.sogou.com/web?query=', NULL, '', 1, 2), + (3, 'bing', 'Bing必应', '微软必应搜索', '#696a6d', 'https://cn.bing.com/search?q=', NULL, '', 1, 3), + (4, 'zhihu', '知乎搜索', '有问题,上知乎', '#0084fe', 'https://www.zhihu.com/search?q=', NULL, '', 1, 4), + (5, 'bilibili', '哔哩哔哩', '(゜-゜)つロ 干杯~', '#00aeec', 'https://search.bilibili.com/all?keyword=', NULL, '', 1, 5), + (6, 'weibo', '微博搜索', '随时随地发现新鲜事', '#ff5722', 'https://s.weibo.com/weibo/', '', '', 1, 6), + (7, 'google', '谷歌搜索', '值得信任的搜索引擎', '#3B83FA', 'https://www.google.com.hk/search?hl=zh-CN&q=', '', '', 1, 7), + (8, 'fanyi', '在线翻译', '输入翻译内容(自动检测语言)', '#0084fe', 'https://translate.google.cn/?hl=zh-CN&sl=auto&tl=zh-CN&text=', NULL, '', 1, 8); +/*!40000 ALTER TABLE `lylme_sou` ENABLE KEYS */; + +DROP TABLE IF EXISTS `lylme_tags`; +CREATE TABLE IF NOT EXISTS `lylme_tags` ( + `tag_id` int(11) NOT NULL AUTO_INCREMENT, + `tag_name` varchar(30) NOT NULL, + `tag_link` varchar(60) NOT NULL, + `tag_target` int(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`tag_id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; + +DELETE FROM `lylme_tags`; +/*!40000 ALTER TABLE `lylme_tags` DISABLE KEYS */; +INSERT INTO `lylme_tags` (`tag_id`, `tag_name`, `tag_link`, `tag_target`) VALUES + (1, '主页', 'https://www.lylme.com/', 0), + (2, '博客', 'https://blog.lylme.com/', 1), + (3, 'Github', 'https://github.com/lylme', 1), + (4, '关于本站', '/about', 1), + (5, '申请收录', '/apply', 1), + (6, '查看', '/pwd', 0); +/*!40000 ALTER TABLE `lylme_tags` ENABLE KEYS */; + +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/install/readme.html b/install/readme.html new file mode 100644 index 0000000..a990f2f --- /dev/null +++ b/install/readme.html @@ -0,0 +1,81 @@ + + + + + +六零导航页 - 用户协议 + + +
    + +

    + 六零导航页 - 用户使用协议 +

    +

    1. 说明

    +1.1 用户即指六零导航页(以下简称“本程序”)后下载、安装、使用本程序的用户。 +

    +

    + 2.用户使用基本规则 +

    +2.1 用户在使用本程序时,必须遵循以下原则: +

    +

    +2.1.1 遵守中国及所在国有关的法律和法规; +

    +

    +2.1.2 用户不得侵任何人的知识产权,包括但不限于不得将侵犯任何人的专利、商标、著作权、商业秘密或其他专属权利; +

    +

    +2.1.3 用户不得侵犯涉密信息,包括但不限于不得将无权传送的内容(例如商业秘密、内部资料、机密资料、个人信息等)进行上载、张贴、发送电子邮件或以其他方式发布、传送、传播、储存、或提供; +

    +

    +2.1.4 用户不得为任何非法目的而使用本程序,包括但不限于应当遵守法律法规,以及所有与网络服务有关的网络协议、规定和程序,不得利用本程序进行任何可能对互联网的正常运转造成不利影响的行为,或其他任何非法行为; +

    +

    +2.1.5 用户无权实施包括但不限于下列行为:删除本程序及其他副本上所有关于版权的信息、内容,对本程序进行反向工程、反向汇编、反向编译等; +

    +

    +2.1.6 用户不得利用本服务实施侵权行为,包括但不限于不得使用虚假、冒充他人或其他方的信息安装、使用本程序,不得冒充任何人或机构,或以虚伪不实的方式谎称或使人误认为其言论或身份与任何人或任何机构有关;不得伪造标题或以其他方式操控识别资料,使人误认为该内容为程序作者所传送;不得利用本程序网络服务系统传播任何骚扰性的、中伤他人的、辱骂性的、庸俗淫秽的或其他任何非法的信息资料; +

    +

    +2.1.7 用户不得破坏本服务的提供,或侵犯本服务相关的任何权利,包括但不限于不得将有关干扰、破坏或限制任何计算机软件、硬件或通讯设备功能的软件病毒或其他计算机代码、档案和程序之资料,加以上载、张贴或其他方式的传播; +

    + +2.2 用户禁止利用本程序及相关服务进行以下活动: +

    +

    +2.2.1 反对宪法所确定的基本原则的; +

    +

    +2.2.2 危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的; +

    +

    +2.2.3 损害国家荣誉和利益的; +

    +

    +2.2.4 煽动民族仇恨、民族歧视,破坏民族团结的; +

    +

    +2.2.5 破坏国家宗教政策,宣扬邪教和封建迷信的; +

    +

    +2.2.6 散布谣言,扰乱社会秩序,破坏社会稳定的; +

    +

    +2.2.7 散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的; +

    +

    +2.2.8 侵害他人合法权益的; +

    +

    +2.2.9 含有法律法规禁止的其他内容的。 +

    +

    +2.3 如用户违反以上约定,产生的一切法律后果,用户将以自己的名义独立承担所有的法律责任,造成的一切损失,由用户承担。 +

    + +
    + + + + diff --git a/install/update.sql b/install/update.sql new file mode 100644 index 0000000..49c67e7 --- /dev/null +++ b/install/update.sql @@ -0,0 +1,47 @@ +-- 表 `lylme_sou` +CREATE TABLE `lylme_sou` ( + `sou_id` int(11) NOT NULL COMMENT '搜索引擎ID', + `sou_alias` varchar(20) NOT NULL COMMENT '搜索引擎别名', + `sou_name` varchar(20) NOT NULL COMMENT '搜索引擎名称', + `sou_hint` varchar(30) NOT NULL DEFAULT '请输入搜索关键词' COMMENT '搜索引擎提示文字', + `sou_color` varchar(20) NOT NULL DEFAULT '#696a6d' COMMENT '搜索引擎字体颜色', + `sou_link` varchar(255) NOT NULL COMMENT '搜索引擎地址', + `sou_waplink` varchar(255) DEFAULT NULL COMMENT '搜索引擎移动端地址', + `sou_icon` text NOT NULL COMMENT '搜索引擎图标', + `sou_st` int(1) NOT NULL DEFAULT '1' COMMENT '搜索引擎开关', + `sou_order` int(2) NOT NULL COMMENT '搜索引擎排序' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='搜索引擎'; +INSERT INTO `lylme_sou` (`sou_id`, `sou_alias`, `sou_name`, `sou_hint`, `sou_color`, `sou_link`, `sou_waplink`, `sou_icon`, `sou_st`, `sou_order`) VALUES +(1, 'baidu', '百度一下', '百度一下,你就知道', '#0c498c', 'https://www.baidu.com/s?word=', 'https://m.baidu.com/s?word=', '', 1, 1), +(2, 'sogou', '搜狗搜索', '上网从搜狗开始', '#696a6d', 'https://www.sogou.com/web?query=', NULL, '', 1, 2), +(3, 'bing', 'Bing必应', '微软必应搜索', '#696a6d', 'https://cn.bing.com/search?q=', NULL, '', 1, 3), +(4, 'zhihu', '知乎搜索', '有问题,上知乎', '#0084fe', 'https://www.zhihu.com/search?q=', NULL, '', 1, 4), +(5, 'bilibili', '哔哩哔哩', '(゜-゜)つロ 干杯~', '#00aeec', 'https://search.bilibili.com/all?keyword=', NULL, '', 1, 5), +(6, 'weibo', '微博搜索', '随时随地发现新鲜事', '#ff5722', 'https://s.weibo.com/weibo/', NULL, '', 1, 6), +(7, 'google', '谷歌搜索', '值得信任的搜索引擎', '#3B83FA', 'https://www.google.com.hk/search?hl=zh-CN&q=', NULL, '', 1, 7), +(8, 'fanyi', '在线翻译', '输入翻译内容(自动检测语言)', '#0084fe', 'https://translate.google.cn/?hl=zh-CN&sl=auto&tl=zh-CN&text=', NULL, '', 1, 8); +ALTER TABLE `lylme_sou` + ADD PRIMARY KEY (`sou_id`); +ALTER TABLE `lylme_sou` + MODIFY `sou_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '搜索引擎ID', AUTO_INCREMENT=9; +COMMIT; + + +-- 表`lylme_tags` +CREATE TABLE `lylme_tags` ( + `tag_id` int(11) NOT NULL, + `tag_name` varchar(30) NOT NULL, + `tag_link` varchar(60) NOT NULL, + `tag_target` int(1) NOT NULL DEFAULT '1' +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +INSERT INTO `lylme_tags` (`tag_id`, `tag_name`, `tag_link`, `tag_target`) VALUES +(1, '主页', 'https://www.lylme.com/', 0), +(2, '博客', 'https://blog.lylme.com/', 1), +(3, 'Github', 'https://github.com/lylme', 1), +(4, '关于本站', '/about', 1); +ALTER TABLE `lylme_tags` + ADD PRIMARY KEY (`tag_id`); +ALTER TABLE `lylme_tags` + MODIFY `tag_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +COMMIT; +UPDATE `lylme_config` SET `v` = 'v1.1.2' WHERE `lylme_config`.`k` = 'version'; \ No newline at end of file diff --git a/install/update1.sql b/install/update1.sql new file mode 100644 index 0000000..1265d45 --- /dev/null +++ b/install/update1.sql @@ -0,0 +1,17 @@ +INSERT INTO `lylme_config` VALUES ('template', 'default','网站模板'); +INSERT INTO `lylme_config` VALUES ('cdnpublic', NULL,'CDN地址'); +INSERT INTO `lylme_config` VALUES ('apply', 0,'收录申请'); +CREATE TABLE `lylme_apply` ( + `apply_id` int(4) NOT NULL, + `apply_name` varchar(20) NOT NULL, + `apply_url` varchar(255) NOT NULL, + `apply_group` int(2) NOT NULL, + `apply_icon` text NOT NULL, + `apply_mail` varchar(30) NOT NULL, + `apply_time` datetime NOT NULL, + `apply_status` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='收录申请'; +ALTER TABLE `lylme_apply` ADD PRIMARY KEY (`apply_id`); +ALTER TABLE `lylme_apply` MODIFY `apply_id` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0; +COMMIT; +UPDATE `lylme_config` SET `v` = 'v1.1.3' WHERE `lylme_config`.`k` = 'version'; \ No newline at end of file diff --git a/install/update2.sql b/install/update2.sql new file mode 100644 index 0000000..c55225b --- /dev/null +++ b/install/update2.sql @@ -0,0 +1,3 @@ +INSERT INTO `lylme_config` (`k`, `v`, `description`) VALUES +('apply_gg', '收录说明:
    1. 禁止提交违规违法站点
    2. 页面整洁,无多个弹窗广告和恶意跳转
    3. 非盈利性网站,网站正常访问
    4. 添加本站友链或网站已ICP备案优先收录
    ', '收录公告'), +('wap_background', '/assets/img/wapbackground.jpg', '手机端背景'); \ No newline at end of file diff --git a/install/update3.sql b/install/update3.sql new file mode 100644 index 0000000..4bbb2ca --- /dev/null +++ b/install/update3.sql @@ -0,0 +1,3 @@ +-- v1.1.6 +ALTER TABLE `lylme_links` ADD `link_status` INT(1) NOT NULL DEFAULT '1' COMMENT '链接状态' AFTER `link_order`; +ALTER TABLE `lylme_groups` ADD `group_status` INT(1) NOT NULL DEFAULT '1' COMMENT '分组状态' AFTER `group_order`; diff --git a/install/update4.sql b/install/update4.sql new file mode 100644 index 0000000..3ac8ed1 --- /dev/null +++ b/install/update4.sql @@ -0,0 +1,14 @@ +-- v1.1.9 +ALTER TABLE `lylme_links` ADD `link_pwd` INT(2) NULL DEFAULT '0' COMMENT '加密组ID' AFTER `link_status`; +ALTER TABLE `lylme_groups` ADD `group_pwd` INT(2) NOT NULL DEFAULT '0' COMMENT '加密组ID' AFTER `group_status`; +CREATE TABLE `lylme_pwd` ( + `pwd_id` int(2) NOT NULL COMMENT '加密组ID', + `pwd_name` varchar(20) NOT NULL COMMENT '加密组名称', + `pwd_key` varchar(20) NOT NULL COMMENT '加密组密码', + `pwd_ps` varchar(30) DEFAULT NULL COMMENT '加密组备注' +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +ALTER TABLE `lylme_pwd` + ADD PRIMARY KEY (`pwd_id`); +ALTER TABLE `lylme_pwd` + MODIFY `pwd_id` int(2) NOT NULL AUTO_INCREMENT COMMENT '加密组ID', AUTO_INCREMENT=1; + INSERT INTO `lylme_tags` (`tag_id`, `tag_name`, `tag_link`, `tag_target`) VALUES (NULL, '查看', '/pwd', '0'); \ No newline at end of file diff --git a/install/update5.sql b/install/update5.sql new file mode 100644 index 0000000..0573a41 --- /dev/null +++ b/install/update5.sql @@ -0,0 +1,2 @@ +-- v1.2.0 +INSERT INTO `lylme_tags` (`tag_id`, `tag_name`, `tag_link`, `tag_target`) VALUES (NULL, '关于本站', '/about', '1'); \ No newline at end of file diff --git a/install/update6.sql b/install/update6.sql new file mode 100644 index 0000000..e9eb53d --- /dev/null +++ b/install/update6.sql @@ -0,0 +1,2 @@ +-- v1.5.1 +ALTER TABLE `lylme_links` CHANGE `name` `name` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '链接标题'; \ No newline at end of file diff --git a/pwd/index.php b/pwd/index.php new file mode 100644 index 0000000..4cf36af --- /dev/null +++ b/pwd/index.php @@ -0,0 +1,88 @@ + + + + + + +访问管理 + + + +';} +?> +
    + + + +

    请输入密码登录

    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +

    欢迎回来,您已登录!

    用户组: +

    +
    + +
    + +
    +
    + +
    + 当前站点未启用链接加密';} + ?> + 返回首页 +
    + + + diff --git a/site/baidu_api.php b/site/baidu_api.php new file mode 100644 index 0000000..a6c1699 --- /dev/null +++ b/site/baidu_api.php @@ -0,0 +1,48 @@ +query("SELECT `id` FROM `lylme_links` WHERE `link_pwd` = 0"); +while ( $site = $DB->fetch($sites)) { + $url = siteurl().'/site-'.$site['id'].'.html'; + array_push($urls,$url); +} +$ch = curl_init(); +$options = array( + CURLOPT_URL => $api, + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_POSTFIELDS => implode("\n", $urls), + CURLOPT_HTTPHEADER => array('Content-Type: text/html'), +); +curl_setopt_array($ch, $options); + +$results = curl_exec($ch); +$httpCode = curl_getinfo($ch,CURLINFO_HTTP_CODE); + +echo $results; +if($httpCode == 200){ + $result = json_decode($results,true); + echo('

    >>>>>>Successful

    + 本次推送:'.count($urls).'条
    + 成功推送:'.$result['success'].'条
    + --------------------------------------
    '. + implode("
    ", $urls)); + } +else { + echo('

    推送失败
    帮助

    '); +} +?> \ No newline at end of file diff --git a/site/index.php b/site/index.php new file mode 100644 index 0000000..d5fd9d7 --- /dev/null +++ b/site/index.php @@ -0,0 +1,42 @@ +query("select * from lylme_links where id='$id' limit 1"); +$site = $DB->fetch($sites); +$info = get_head($site["url"]); +if (empty($site["icon"])) { + $site["icon"] = '' . $site['; +} else if (!preg_match("/^'; +} else { + $site["icon"] = $site["icon"]; +} +if(empty($DB->num_rows($sites)) || $site['link_pwd']!=0){ + include(theme_file('404.php')); //页面不存在 + exit(); +} +else { + $groups = $DB->query("select `group_name`,`group_icon` from lylme_groups where group_id=".$site['group_id']." limit 1"); + $group = $DB->fetch($groups); + include(theme_file('site.php')); + + // $pv =$site['link_pv']+1; + // $DB->query("UPDATE `lylme_links` SET `link_pv` = '".$pv."' WHERE `lylme_links`.`id` = $id;"); + exit(); +} + +/** + * 变量说明 + * $groups['group_name'] 所在分组名称 + * $groups['group_icon'] 所在分组图标 + * $site['id'] 链接ID + * $site['name'] 链接名称 + * $site['url'] 链接地址 + * $site['PS'] 链接描述 + * $info['title'] 网站标题 + * $info['description'] 网站描述 + * $info['keywords'] 网站关键词 + **/ +?> + + diff --git a/site/sitemap.php b/site/sitemap.php new file mode 100644 index 0000000..c0a04ff --- /dev/null +++ b/site/sitemap.php @@ -0,0 +1,35 @@ +'."\n".''."\n"; +?> + + + + daily + 1.0 + + + + -01 + monthly + 0.9 + + + + -01 + monthly + 0.9 + + query("SELECT `id` FROM `lylme_links` WHERE `link_pwd` = 0"); + while ( $site = $DB->fetch($sites)) { ?> + + + -01 + monthly + 0.8 + + + \ No newline at end of file diff --git a/site/template/404.php b/site/template/404.php new file mode 100644 index 0000000..f5d2b59 --- /dev/null +++ b/site/template/404.php @@ -0,0 +1,31 @@ + + + + + + +404 - 页面不存在 + + + + +
    +
    +
    +

    404

    +

    抱歉,页面不存在!

    + 返回首页 +
    +
    +
    + + + diff --git a/site/template/site.php b/site/template/site.php new file mode 100644 index 0000000..c72823d --- /dev/null +++ b/site/template/site.php @@ -0,0 +1,47 @@ + + + + <?php echo $site['name'] . " - " .explode("-", $conf['title'])[0];?> + + + 已收录站点:" /> + + + + + + + +
    +'. $site["name"].''; +if(!empty($info['title'])){ + echo '

    网站标题:'.$info['title'].'

    '; +} +if(!empty($info['description'])){ + echo '

    网站描述:'.$info['description'].'

    '; +} +if(!empty($info['keywords'])){ + echo '

    网站关键词:'.$info['keywords'].'

    '; +} + +echo '

    所在分组:'.$group['group_name'].'

    +'; +echo "

    返回 访问

    "; +?> + + +
    + + \ No newline at end of file diff --git a/site/伪静态文件/.htaccess b/site/伪静态文件/.htaccess new file mode 100644 index 0000000..2fe9fef --- /dev/null +++ b/site/伪静态文件/.htaccess @@ -0,0 +1,4 @@ +RewriteEngine On +#RewriteBase / +RewriteRule ^site-(\d+)\.html$ /site/index.php?id=$1 +RewriteRule ^/sitemap.xml$ /site/sitemap.php \ No newline at end of file diff --git a/site/伪静态文件/nginx.txt b/site/伪静态文件/nginx.txt new file mode 100644 index 0000000..fca3a87 --- /dev/null +++ b/site/伪静态文件/nginx.txt @@ -0,0 +1,2 @@ +rewrite ^/site-(\d+)\.html$ /site/index.php?id=$1; +rewrite ^/sitemap.xml$ /site/sitemap.php; \ No newline at end of file diff --git a/template/5iux/README.md b/template/5iux/README.md new file mode 100644 index 0000000..cdc0bb6 --- /dev/null +++ b/template/5iux/README.md @@ -0,0 +1,60 @@ +# 5IUX搜索 + +用惯了各种导航首页,满屏幕尽是各种不厌其烦的广告和资讯;尝试自己写个自己的主页。不是镜像不是代理,就当做浏览器主页使用,支持自适应屏幕。 + + + + +### GIF示例效果 +![简单搜索](https://i.loli.net/2021/01/19/JsV34pBOcTbZk79.gif) +> (图片效果,以实际页面为准) + + + +## 下载地址: + +[Releases](https://github.com/5iux/sou/releases) + +## Gitee同步更新 +[https://gitee.com/cn5iux/sou](https://gitee.com/cn5iux/sou) + + + + +## 示例页面: + ++ php版本:[https://5iux.cn/](https://5iux.cn/) + ++ html+js+css版本(写了个新的,有空去围观):[https://github.com/5iux/5iux.github.io](https://github.com/5iux/5iux.github.io) + + + + + + +## 组件: + +### 图标: +图标调用了阿里的图标`https://www.iconfont.cn/`,提供下本地包[点击下载](https://cdn.jsdelivr.net/gh/5iux/sou/icon.zip) +嫌麻烦的可以使用js版本示例里面的`font-awesome` + + + +### 天气组件 + +[天气API地址](https://dev.qweather.com/widget/) + + +### 背景图 +已默认添加随机加载bing背景,不需要刻意在index.php中删除; + +如使用自定义背景,可以删除bing背景后在页面内添加以下代码: +```html + +``` + +## 其他 +我这个只是个示例,有需求还是自己改,不喜欢php想换成js也可以; + diff --git a/template/5iux/css/style.css b/template/5iux/css/style.css new file mode 100644 index 0000000..8bd3663 --- /dev/null +++ b/template/5iux/css/style.css @@ -0,0 +1,81 @@ +@charset "utf-8"; +/* +作者:D.Young +主页:https://yyv.me/ +github:https://github.com/5iux/sou +日期:2019-07-11 +版权所有,请勿删除 +*/ + +*{padding:0;margin:0;outline:none;-webkit-tap-highlight-color:transparent} +html,body{width:100%;height:100%;position:relative;overflow:hidden;background:#fff} +html{font-family:'Noto Sans SC Sliced',PingFangSC-Light,Microsoft YaHei UI,Microsoft YaHei,helvetica,sans-serif;font-weight:500;color:#000} +form,input,button{padding:0;margin:0;border:none;outline:none;background:none} +input::-webkit-input-placeholder{color:#ccc;letter-spacing:2px;font-size:16px} +ul,li{display:block;list-style:none} +a{text-decoration:none;color:#000} +#content{width:100%;height:100%} +li img{width:14px;height:14px;margin:0 5px 0 8px;vertical-align:-0.15em;fill:currentColor;overflow:hidden} +.con{width:100%;transition:1s all;margin:auto;min-width:320px;height:380px;position:absolute;left:0;top:-100px;right:0;bottom:0} +.con .shlogo{position:relative;width:auto;height:auto;margin:20px auto} +h2.title{text-align:center;color:#fff;font-size:36px;font-weight:600;text-shadow:1px 1px 8px #504b4b} +.con .shlogo a{width:100%;display:block;width:100%;height:100%} +.con .sou{max-width:680px;position:relative;width:calc(100% - 60px);min-width:320px;margin:0 auto} +.content{margin:10px} +.con .sou form{width:100%;height:50px;display:block;margin:50px auto 30px;position:relative} +.con .sou form .wd{background:#ffffff2e;padding-left:1em;width:100%;height:100%;display:block;border:1px solid #ddd;border-radius:25px;line-height:100%;font-size:17px;text-indent:50px;transition:0.3s all;color:#fff} +.lg{z-index:1000} +.con .sou form .lg svg{display:block;width:25px;height:25px;position:absolute;left:15px;top:12px;overflow:hidden;cursor:pointer} +.con .sou form .lg img{display:block;width:25px;height:25px;position:absolute;left:25px;top:12px;overflow:hidden;cursor:pointer} +.con .sou form .wd:focus{color:#000;background:#fff;box-shadow:0 0px 15px 0 rgba(32,33,36,0.2);border-color:#fff} +.con .sou form button{width:40px;height:40px;display:block;position:absolute;z-index:10;right:6px;top:6px;cursor:pointer;font-size:22px;line-height:40px;border-radius:50%;color:#777} +.con .sou #word{backdrop-filter: blur(10px);width:calc(100% - 70px);padding: 15px;border-radius:10px;left:20px;position:absolute;z-index:500;top:65px;background:#ffffffb0;;line-height:30px;font-size:16px;overflow:hidden;display:none} +.con .sou #word li{cursor:pointer;color:#555;margin: 5px;} +#word li:hover{background-color:#ddd} +.foot{text-shadow: 0px 0px 5px black;position:absolute;bottom:10px;text-align:center;width:100%;color:#fff;line-height:20px;font-size:12px;height:auto} +.foot a{color:#fff} +.home{width:50px;height:50px;position:absolute;right:70px;top:10px;z-index:200;cursor:pointer} +.home a{font-size:20px;color:#999;line-height:50px;display:block;text-align:center} +#menu{width:50px;height:50px;background: #29f;border-radius: 50%;transform:scale(0.8);position:absolute;right:10px;top:5px;z-index:2000000;cursor:pointer;transition:0.5s} +#menu i{position:absolute;left:0;right:0;margin:24px auto;width:30px;height:2px;background:#fff} +#menu i:before{content:'';width:20px;height:2px;top:-8px;background:#fff;position:absolute;right:0} +#menu i:after{content:'';width:20px;height:2px;bottom:-8px;background:#fff;position:absolute;left:0} +#menu.on{right:380px;background:#29f;border-radius:25px} +#menu.on i{width:20px;background:#fff} +#menu.on i:before{top:-5px;transform:rotate(45deg);width:14px;right:-1px;left:auto;background:#fff} +#menu.on i:after{bottom:-5px;transform:rotate(-45deg);width:14px;right:-1px;left:auto;background:#fff} +.list{width:337px;padding:0 20px;height:100%;overflow:hidden;overflow-y:auto;position:absolute;right:0px;z-index:2000;background:#222d46;transition:0.3s all linear} +.list.closed{right:-380px} +.list ul{width:330px;float:left;padding:0 0 20px;margin-bottom:20px} +.list ul li{word-break:break-all;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;float:left;margin:5px;width:100px;height:30px;text-align:left;line-height:30px} +.list ul li a{width:100%;border-radius:5px;transition:0.2s all linear;height:100%;display:block;color:#fff;font-weight:500;background:#293550;text-align:left;font-size:12px} +.list ul li:hover a{color:#fff;background-color:#29f;background-image:linear-gradient(135deg,rgba(35,153,255) 0%,rgba(84,175,253) 100%);box-shadow:0 3px 3px rgba(0,40,70,.3)} +.list ul li.title{width:100%;height:40px;line-height:40px;margin:30px 0 0;text-align:left;text-indent:10px;color:#fff;font-size:18px;font-weight:bold} +svg.icon{width:14px;height:14px;margin:0 5px 0 8px;vertical-align:-0.15em;fill:currentColor;overflow:hidden} +.list ul li.title svg.icon{width:20px;height:20px} +@media (max-width:640px){.con{top:0px} +.con .shlogo{width:auto;height:auto} +.con .sou form .wd:focus{background:#f1f1f1;box-shadow:none;border-color:#ccc} +.con .sou form button{border-radius:25px} +.con .sou #word{max-height:150px} +#menu.on{right:270px} +.list{width:227px} +.list ul{width:220px} +.con .sou ul li{width:100px;font-size:12px;text-indent:30px} +.home,#menu{top:5px} +.mywth{color:#777;left:10px} +.mywth.hidden{display:none} +}@media (max-height:420px){.con{margin:0;top:0px} +.con .shlogo{display:none} +.home,#menu,.mywth,.foot{display:none} +}@media (prefers-color-scheme:dark){body{background-color:#162035} +.mywth{color:#bbb} +.con .sou form .wd:focus{background:#293550;border:1px solid #162035} +.con .sou form .wd{border:1px solid #293550;color:#bbb} +.con .sou #word{border:15px solid #293550;background:#293550} +.con .sou #word .click_work{color:#89b} +}::-webkit-scrollbar{width:6px;height:6px} +::-webkit-scrollbar-track{background:#222d46;border-radius:0px} +::-webkit-scrollbar-thumb{background:#293550;border-radius:0px} +::-webkit-scrollbar-thumb:hover{background:#293550} +::-webkit-scrollbar-corner{background:#222d46} \ No newline at end of file diff --git a/template/5iux/css/wea.css b/template/5iux/css/wea.css new file mode 100644 index 0000000..6c602ef --- /dev/null +++ b/template/5iux/css/wea.css @@ -0,0 +1,40 @@ +@charset "utf-8"; +/* +作者:D.Young +主页:https://yyv.me/ +github:https://github.com/5iux/sou +日期:2019-07-11 +版权所有,请勿删除 +*/ +.mywth{position:absolute;left:20px;top:15px;height:20px;line-height:20px;cursor:pointer;z-index:100000;color:#fff !important;font-size:14px;text-shadow:0px 1px 0px #000} +.mywth .wea{display:inline-block;height:18px;vertical-align:middle;padding-bottom:3px} +@keyframes bgmove{0%{background-position:left} +50%{background-position:right} +100%{background-position:left} +}.mywth .wea_hover{width:400px;padding:25px 10px;position:absolute;z-index:100000;font-size:12px;line-height:20px;left:0;top:30px;box-shadow:5px 5px 5px 0 rgba(33,150,243,0.3);border-radius:15px;background-size:cover;background-repeat:no-repeat;background-position:left;color:#fff;visibility:hidden;opacity:0;transition:0.3s all;animation:bgmove 16s linear infinite} +.mywth:hover .wea_hover{visibility:visible;opacity:1} +.wea_in{position:relative;float:left;width:calc(100% - 20px);margin-left:10px} +.wea_top span{display:block;float:left;line-height:20px} +.wea_top span.city{width:100%;line-height:26px} +.wea_top span.city b{display:inline-block;float:left;background:#fd0;font-size:14px;padding:0 10px;border-radius:13px;color:#06b;margin-right:5px} +.wea_top span.img{width:50px;height:120px} +.wea_top span.tem{width:120px;height:120px;text-align:center} +.wea_top span.tem b{display:block;width:100%;height:40px;font-weight:lighter;font-size:32px;line-height:40px;margin-top:30px} +.wea_top span.air{height:40px;width:120px;margin-top:30px} +.wea_top span.air_tips{text-indent:15px} +.wea_con{margin:20px 10px;position:relative;float:left} +.wea_con ul{width:100%;margin-left:1px} +.wea_con ul li{float:left;width:calc(25% - 12px);font-size:12px;overflow:hidden;border:1px solid #eee;padding:0 5px;font-size:12px;line-height:25px;font-weight:bold;text-align:center;position:relative;margin:0 -1px -1px 0} +.wea_con ul li b{color:#fd0;font-size:14px} +.wea_con ul li:hover{background:rgba(255,255,255,0.3);color:#000} +.wea_con ul li i{display:none;font-size:12px;font-weight:normal;font-style:normal;line-height:16px;margin:5px 0} +.wea_foot ul{position:relative;float:left;width:100%} +.wea_foot ul li{float:left;width:33.3%;overflow:hidden;text-align:center;font-weight:bold} +.wea_foot ul li img{display:inline-block;vertical-align:center;height:30px;margin:5px} +.wea_foot ul li b{color:#0f0;font-weight:normal} +.wea_foot ul li i{font-weight:normal;font-style:normal} +@media (max-width:640px){.mywth{color:#777;left:10px;top:20px} +.mywth .wea_hover{display:none} +.mywth.hidden{display:none} +}@media (max-height:420px){.mywth{display:none} +} \ No newline at end of file diff --git a/template/5iux/index.php b/template/5iux/index.php new file mode 100644 index 0000000..2064160 --- /dev/null +++ b/template/5iux/index.php @@ -0,0 +1,159 @@ +fetch($DB->query("SELECT * FROM `lylme_sou` WHERE `sou_alias` LIKE '".$t."'"))) { + if (checkmobile()&& !empty($soulist["sou_waplink"])) { + echo''; + } else { + echo''; + } + } else { + echo''; + } +} +?> + + + + + + <?php echo $conf['title']?> + + + + + + + + + + + + + + + + + + + +';} + else{ echo '';}?> + +
    + '
      ', //分组开始标签 + 'g2' => '
    • {group_icon}{group_name}
    • ', //分组内容 + 'g3' => '
    ', //分组结束标签 + + 'l1' => '
  • ', //链接开始标签 + 'l2' => '{link_icon}{link_name}', //链接内容 + 'l3' => '
  • ', //链接结束标签 +); +lists($html); + +echo '
    '; +if ($conf['tq']) { + echo ' +
    +
    +
    +
    +
      +
      +
      +
        +
        +
        + + + '; +} +?> +
        +
        +
        + +
        +
        + query("SELECT * FROM `lylme_sou` ORDER BY `lylme_sou`.`sou_order` DESC"); +$i = 0; +while ($soulist = $DB->fetch($soulists)) { + if ($soulist["sou_st"] == 1 && $soulist["sou_alias"] == $t) { + if(empty($soun)) { + $alias = $DB->fetch($DB->query("SELECT * FROM `lylme_sou` WHERE `sou_alias` NOT LIKE '".$soulist["sou_alias"]."' ORDER BY `sou_order` ASC LIMIT 1")); + $soun = $alias["sou_alias"]; + } + echo '
        ' . $soulist["sou_icon"] . '
        + '; + $sousw = 1; + } + if ($soulist["sou_st"] == 1) { + $soun = $soulist["sou_alias"]; + } + if(empty($soun))break; +} +if(empty($sousw)||empty($soun)) { + $alias = $DB->fetch($DB->query("SELECT * FROM `lylme_sou` WHERE `sou_alias` NOT LIKE 'baidu' ORDER BY `sou_id` DESC LIMIT 1")); + echo '
        + + '; +} +?> + +
        +
        +
        +
        +
        +' . yan().'

        '; +} +$i= 0; +$tagslists = $DB->query("SELECT * FROM `lylme_tags`"); +while($taglists = $DB->fetch($tagslists)) { + echo '' . $taglists["tag_name"] . ''; + if($i<$DB->num_rows($tagslists)-1) { + $i++; + echo ' | '; + } +} +?> + + '.$conf["wztj"].'

        '; +} +?> + + '.$conf['icp'].'

        '; +} +?> + +

        Theme by 5iux .

        +
        + + + +var sou = "?t="+localStorage.getItem("sou");window.location.href=sou;';} +echo ''; +?> + + + \ No newline at end of file diff --git a/template/5iux/js/sou.js b/template/5iux/js/sou.js new file mode 100644 index 0000000..12d5ef0 --- /dev/null +++ b/template/5iux/js/sou.js @@ -0,0 +1,78 @@ +/* +作者:D.Young +主页:https://yyv.me/ +github:https://github.com/5iux/sou +日期:2020/11/18 +版权所有,请勿删除 +*/ + +$(document).ready(function() { + //判断窗口大小,添加输入框自动完成 + var wid = $("body").width(); + if (wid < 640) { + //$(".wd").attr('autocomplete', 'off'); + } else { + $(".wd").focus(); + } + //菜单点击 + $("#menu").click(function(event) { + $(this).toggleClass('on'); + $(".list").toggleClass('closed'); + $(".mywth").toggleClass('hidden'); + }); + $("#content").click(function(event) { + $(".on").removeClass('on'); + $(".list").addClass('closed'); + $(".mywth").removeClass('hidden'); + $('#word').hide(); + }); + $(".mywth").click(function(event) { + var wt = $("body").width(); + if (wt < 750 || wt == 750) { + //window.location.href = "https://tianqi.qq.com/"; + window.location.href = "/weather/"; + } + }); +}); + +//关键词sug +$(function() { + //当键盘键被松开时发送Ajax获取数据 + $('.wd').keyup(function() { + var keywords = $(this).val(); + if (keywords == '') { $('#word').hide(); return }; + $.ajax({ + url: 'https://suggestion.baidu.com/su?wd=' + keywords, + dataType: 'jsonp', + jsonp: 'cb', //回调函数的参数名(键值)key + // jsonpCallback: 'fun', //回调函数名(值) value + beforeSend: function() { + // $('#word').append('
      • 正在加载。。。
      • '); + }, + success: function(data) { + $('#word').empty().show(); + if (data.s == '') { + //$('#word').append('
        Not find "' + keywords + '"
        '); + $('#word').hide(); + } + $.each(data.s, function() { + $('#word').append('
      • ' + this + '
      • '); + }) + }, + error: function() { + $('#word').empty().show(); + //$('#word').append('
        Fail "' + keywords + '"
        '); + $('#word').hide(); + } + }) + }) + //点击搜索数据复制给搜索框 + $(document).on('click', '#word li', function() { + var word = $(this).text(); + $('.wd').val(word); + $('#word').hide(); + $("form").submit(); + // $('#texe').trigger('click');触发搜索事件 + }) + +}) \ No newline at end of file diff --git a/template/5iux/js/wea.js b/template/5iux/js/wea.js new file mode 100644 index 0000000..730e190 --- /dev/null +++ b/template/5iux/js/wea.js @@ -0,0 +1,55 @@ +/*天气插件开始 +天气插件api请在wea目录中index.php修改 +申请地址:和风天气-https://dev.heweather.com/ +*/ +//菜单点击 +$("#menu").click(function(event) { + $(".mywth").toggleClass('hidden'); +}); +$("#content").click(function(event) { + $(".mywth").removeClass('hidden'); +}); + +$.ajax({ + url: './template/5iux/wea/', + dataType: 'json', + error: function() { + console.log('天气插件网络错误!'); + }, + success: function(res) { + //判断夜晚 + var now = new Date(), + hour = now.getHours(); + if (hour < 18) { myday = "d"; } else { myday = "n"; } + //天气 + $('.mywth').append(res.HeWeather6[0].basic.location + ' ' + res.HeWeather6[0].now.cond_txt + ' ' + res.HeWeather6[0].now.tmp + '℃ ' + res.HeWeather6[0].now.wind_dir); + + $('.wea_hover').css('background-image', 'url(https://cdn.heweather.com/img/plugin/190516/bg/view/' + res.HeWeather6[0].now.cond_code + myday + '.png)'); + //今日天气 + $('.wea_top').append('' + res.HeWeather6[0].basic.location + ' ' + res.HeWeather6[0].update.loc + ' 更新 ' + res.HeWeather6[0].now.tmp + '℃' + res.HeWeather6[0].now.cond_txt + '紫外线指数:' + res.HeWeather6[0].lifestyle[5].brf + '
        相对湿度:' + res.HeWeather6[0].now.hum + '%
        ' + res.HeWeather6[0].now.wind_dir + ':' + res.HeWeather6[0].now.wind_sc + '级
        ' + res.HeWeather6[0].lifestyle[3].txt + ''); + //今日指数 + var wea_con; + for (var x = 0; x < 8; x++) { + wea_con = '
      • 指数
        ' + res.HeWeather6[0].lifestyle[x].brf + '
      • '; + $(".wea_con ul").append(wea_con); + } + $('.wea_comf span').text('舒适度'); + $('.wea_drsg span').text('穿衣'); + $('.wea_flu span').text('感冒'); + $('.wea_sport span').text('运动'); + $('.wea_trav span').text('旅游'); + $('.wea_uv span').text('紫外线'); + $('.wea_cw span').text('洗车'); + $('.wea_air span').text('空气'); + + + //未来3天天气 + var wea_foot; + for (var i = 0; i < 3; i++) { + wea_foot = '
      • ' + res.HeWeather6[0].daily_forecast[i].date + '

        ' + res.HeWeather6[0].daily_forecast[i].cond_txt_d + '
        ' + res.HeWeather6[0].daily_forecast[i].tmp_min + '°/' + res.HeWeather6[0].daily_forecast[i].tmp_max + '°' + '
      • '; + $(".wea_foot ul").append(wea_foot); + } + } +}); + +/*天气插件结束*/ \ No newline at end of file diff --git a/template/5iux/theme.ini b/template/5iux/theme.ini new file mode 100644 index 0000000..6a84a10 --- /dev/null +++ b/template/5iux/theme.ini @@ -0,0 +1,8 @@ +{ + "author_name": "5iux", + "author_link": "https://github.com/5iux/sou", + "theme_name": "5iux", + "theme_version": "2.0", + "theme_explain": "5IUX搜索", + "theme_demo": "https://spage.lylme.com/theme/5iux" +} \ No newline at end of file diff --git a/template/5iux/wea/index.php b/template/5iux/wea/index.php new file mode 100644 index 0000000..43137e2 --- /dev/null +++ b/template/5iux/wea/index.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/template/README.md b/template/README.md new file mode 100644 index 0000000..f824e82 --- /dev/null +++ b/template/README.md @@ -0,0 +1,3 @@ +#### 六零导航页主题目录 + +[六零导航页主题开发文档](http://doc.lylme.com/dev/theme) \ No newline at end of file diff --git a/template/baisu/README.md b/template/baisu/README.md new file mode 100644 index 0000000..e09ac81 --- /dev/null +++ b/template/baisu/README.md @@ -0,0 +1,35 @@ +# 六零导航页baisu主题 +六零导航页(LyLme Spage)`baisu`主题,基于[baisuTwo](https://gitee.com/LyLme/baisu-two)开发 + +## 注意 + +**该项目为主题模板文件,不支持直接使用,请前往[LyLme_Spage](https://gitee.com/LyLme/lylme_spage)载安装完整项目源码搭建** + +## 截图 + +**baisu主题PC端截图** + +![六零导航页baisuTwo主题PC端截图](https://cdn.lylme.com/img/lylme_spage/image-20220501192454699.png) + +![六零导航页baisuTwo主题PC端截图2](https://cdn.lylme.com/img/lylme_spage/image-20220501225604644.png) + +**baisu主题手机端截图** + +![六零导航页baisuTwo主题手机端截图](https://cdn.lylme.com/img/lylme_spage/image-20220501192631560.png) + +![六零导航页baisuTwo主题手机端截图2](https://cdn.lylme.com/img/lylme_spage/image-20220501225251579.png) + +## 天气插件 + +天气插件采用的是【和风天气】的标准版天气插件,可无限制免费试用,需要先注册和风天气账号, +[和风天气账号注册](https://id.qweather.com/#/register); +[和风天气创建插件页面](https://widget.qweather.com/create-standard) +插件 选择【横版】、【款:240px】、【高:180px】;否则会出现样式偏移的问题。其他条件任选。 +生成代码后 除第一行`
        `外,其他代码复制到主题文件夹下`index.php`底部对应位置即可。 + +## 相关链接 + +* [OneNav官网](https://nav.rss.ink/) +* [onenav作者](https://www.xiaoz.me/) +* [baisuTwo](https://gitee.com/LyLme/baisu-two) +* [LyLme_Spage](https://gitee.com/LyLme/lylme_spage) \ No newline at end of file diff --git a/template/baisu/baisuTwo.md b/template/baisu/baisuTwo.md new file mode 100644 index 0000000..ab4e661 --- /dev/null +++ b/template/baisu/baisuTwo.md @@ -0,0 +1,32 @@ +# OneNav主题 +onenav导航的主题 +![输入图片说明](https://images.gitee.com/uploads/images/2022/0226/233837_3fa5c693_1718725.png "屏幕截图.png") +![输入图片说明](https://images.gitee.com/uploads/images/2022/0226/233859_ed83bce1_1718725.png "屏幕截图.png") + +## 天气插件 +天气插件采用的是【和风天气】的标准版天气插件,可无限制免费试用,需要先注册和风天气账号, +[和风天气账号注册](https://id.qweather.com/#/register); +[和风天气创建插件页面](https://widget.qweather.com/create-standard) +插件 选择【横版】、【款:240px】、【高:180px】;否则会出现样式偏移的问题。其他条件任选。 +生成代码后 除第一行`
        `外,其他代码复制到主题文件夹下`index.php`底部对应位置即可。 + + +## 一键添加 +![输入图片说明](https://images.gitee.com/uploads/images/2021/0410/112213_3a134ad6_1718725.gif "a.gif") + +在浏览器标签栏添加新标签 +标签名称栏随意填写 +标签地址栏,填写一下地址代码 + +``` +javascript: var url = location.href; +var title = document.title; +void(open('http://www.你的域名.com/index.php?c=admin&page=add_quick_tpl&url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title), "_blank", "toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, left=200,top=200,width=400, height=460")); +``` +注意域名要替换成你的域名,然后保存即可。 + + +## 相关链接 + +* [OneNav官网](https://nav.rss.ink/) +* [onenav作者](https://www.xiaoz.me/) \ No newline at end of file diff --git a/template/baisu/css/style.css b/template/baisu/css/style.css new file mode 100644 index 0000000..f60ea69 --- /dev/null +++ b/template/baisu/css/style.css @@ -0,0 +1,181 @@ +/*百素(1099116749@qq.com)*/ +/* +修改内容 +.footer +.search-main .search-input input.kw +.search-main button.search-btn +.search-main .search-input input.kw +.search-main .search-btnlist .search-lists .list img +.search-main button.search-btn img +.search-main .search-input +.search-main-w .date-main +.index-nav .type-list .list +.index-nav .type-list .list a +.index-nav .logo a +.search-main-w +.search-main +.tool-list .list +.site-main .site-list .list +.m-header .logo (max-width:1200px) +.m-header .navbar(max-width:1200px) +.search-main-w(max-width:1200px) +#he-plugin-standard(max-width:1200px) +.search-main .search-btnlist .search-lists(max-width:1200px) +新增: +.m-header .logo a(max-width:1200px) +.wv-n-h-now-rain +p.content +#word +#word li +六零(admin@lylme.com) +*/ +#word{width:60%;justify-content:space-between;align-items:center;flex-wrap:wrap;position:absolute;top:290px;background-color:#FFFFFF;padding:12px;border-radius:6px;z-index:100;box-shadow:0px 0px 1px #999} +#word li{margin:10px;padding:5px;width:100%;cursor:pointer} +p.content{text-align:center;color:#999;font-family:cursive;font-size:15px;margin:15px} +.urllist img,.urllist svg,.site-name svg{width:24px;height:20px;margin:auto 15px auto 0px} +.list svg.icon,.list img{width:22px;height:22px;margin-right:10px} +*{padding:0;margin:0;box-sizing:border-box;font-size:14px} +input:focus{outline:none} +textarea:focus{outline:none} +input{} +body{background-color:#f5f6fa} +img{border:none} +li{list-style:none} +h1,h2,h3,h4,h5,h6{font-weight:normal} +a{color:inherit;text-decoration:none} +.cl{clear:both} +.kongs,.kongs:hover{height:0 !important;margin:0 !important;padding:0 !important;border:none !important;background-color:transparent !important;box-shadow:none !important} +.index-nav{width:240px;height:100vh;background-color:#FFFFFF;padding:20px 5px 100px 0px;box-shadow:1px 0px 5px 0 #eeeeee;position:fixed;top:0;bottom:0;left:0;z-index:9} +.index-nav .logo{width:100%;margin-bottom:30px} +.index-nav .logo a{display:block;font-weight:bold;font-size:24px;height:30px;margin:25px} +.m-header .logo a{font-size:18px;font-weight:bold;line-height:2} +.index-nav .logo img{display:block;height:100%;margin:auto} +.index-nav .type-list{height:calc(100% - 60px);padding:0 25px 100px;overflow:auto} +.index-nav .type-list::-webkit-scrollbar{width:6px;background-color:transparent} +.index-nav .type-list::-webkit-scrollbar-button{height:0px;width:0px} +.index-nav .type-list::-webkit-scrollbar-thumb{background-color:#64a15e;border-radius:50px} +.index-nav .type-list::-webkit-scrollbar-track{background-color:transparent} +.index-nav .type-list::-webkit-scrollbar-track-piece{background-color:transparent} +.index-nav .type-list .list{display:flex;justify-content:flex-start;align-items:center;margin-bottom:3px;line-height:42px;transition:0.3s all;overflow:hidden} +.index-nav .type-list .list a{width:100%;display:flex;justify-content:flex-start;align-items:center;font-size:14px;font-weight:bold;padding:0 10px;border-radius:5px;color:#3a3a3a;transition:0.3s all} +.index-nav .type-list .list a i{display:block;margin-right:6px;font-size:22px} +.index-nav .type-list .list span{display:block;width:0;overflow:hidden;text-align:center;background-color:#477975;cursor:pointer;border-radius:0px 5px 5px 0px;color:#FFFFFF;transition:0.3s all} +.index-nav .type-list .list span i{display:block;font-size:18px;transition:0.3s all} +.index-nav .type-list .list:hover a{background-color:#00a2fda6;color:#FFFFFF;transition:0.3s all} +.index-nav .type-list .list:hover span{width:20%;transition:0.3s all} +.index-nav .user-info{width:100%;background-color:#ffffff;padding:25px;display:flex;justify-content:flex-start;align-items:center;position:absolute;bottom:0;left:0} +.index-nav .user-info .pic{display:block;width:45px;height:45px;border-radius:100%;overflow:hidden} +.index-nav .user-info .pic img{display:block;width:100%;height:100%} +.index-nav .user-info .text{padding-left:10px} +.index-nav .user-info .text p.t1{font-weight:bold;color:#555555;margin-bottom:5px} +.index-nav .user-info .text p.t2{color:#c2c2c2} +.index-main{width:100%;padding-left:260px;padding-top:20px;padding-right:20px} +.search{width:100%;display:none;justify-content:space-between;align-items:center} +.search .list{width:370px;position:relative} +.search .list input.kw{display:block;width:100%;height:40px;padding:0 55px 0 25px;border-radius:40px;border:none} +.search .list button{display:block;height:40px;width:50px;background-color:transparent;border:none;position:absolute;top:0;bottom:0;right:0} +.search .list button i{display:block;font-weight:bold;font-size:16px;color:#64a15e} +.search .addsite{width:40px;height:40px;text-align:center;line-height:40px;background-color:#64a15e;border-radius:6px;cursor:pointer} +.search .addsite i{display:block;font-size:26px;color:#FFFFFF} +.search-main-w{width:100%;display:flex;justify-content:space-between;align-items:center} +.search-main{display:flex;padding-top:25px;align-items:center;border-radius:6px;background:none} +.search-main .search-input{width:80%;position:relative} +.search-main .search-input input.kw{font-size:15px;display:block;width:100%;height:50px;padding:0 65px 0 25px;border-radius:10px 0px 0px 10px;border:1px solid #F2F2F2} +.search-main .search-input button.search-bendi{display:block;height:50px;width:60px;background-color:transparent;border:none;position:absolute;top:0;bottom:0;right:0} +.search-main .search-input button.search-bendi i{display:block;font-weight:bold;font-size:20px;color:#64a15e} +.search-main .search-btnlist{display:flex;justify-content:center;align-items:center;position:relative} +.search-main button.search-btn{width:auto;min-width:120px;height:50px;border:none;background-color:#ffffff;color:#3a3a3a;font-weight:bold;font-size:15px;display:flex;justify-content:center;align-items:center;cursor:pointer;border-left:2px solid #9c9fa712} +.search-main button.search-btn img,.search-main button.search-btn svg{display:block;width:25px;height:25px;border-radius:6px;margin-right:6px} +.search-main button.search-btn i{display:block;margin-right:4px;font-size:20px;line-height:50px} +.search-main button.search-change{width:30px;height:50px;text-align:center;border:none;border-radius:0px 10px 10px 0px;background-color:#2C73D2;color:#ffffff;font-size:16px;display:flex;justify-content:center;align-items:center;cursor:pointer} +.search-main button.search-change i{display:block;font-size:16px;line-height:50px} +.search-main .search-btnlist .search-lists{width:390px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;position:absolute;top:60px;right:0;background-color:#FFFFFF;padding:12px;border-radius:6px;z-index:100;box-shadow:0px 0px 6px #000000} +.search-main .search-btnlist .search-lists.hide{display:none} +.search-main .search-btnlist .search-lists .list{width:33%;line-height:40px;padding:0 10px;display:flex;justify-content:flex-start;align-items:center;font-size:15px;border-radius:6px;cursor:pointer;transition:0.3s all} +.search-main .search-btnlist .search-lists .list img,.search-main .search-btnlist .search-lists .list svg{display:block;width:20px;height:20px;margin-right:8px;border-radius:6px} +.search-main .search-btnlist .search-lists .list:hover{background-color:#64a15e;color:#FFFFFF;transition:0.3s all} +.search-main-w .date-main{text-shadow:1px 1px 8px #504b4b;width:49%;height:180px;background-color:#477975;background-repeat:no-repeat;background-position:initial;background-size:cover;border-radius:6px;display:flex;justify-content:center;flex-direction:column;transition:0.3s all;position:relative} +div#he-plugin-standard{width:49% !important;height:180px !important;background-repeat:round !important} +.wv-n-h-now-rain{bottom:10px !important} +.search-main-w .date-main .times{width:100%;display:block;text-align:center;color:#FFFFFF;font-size:240%;font-weight:bolder;letter-spacing:2px;margin-bottom:15px;line-height:1} +.search-main-w .date-main .list{width:100%;align-items:center;text-align:center} +.search-main-w .date-main span{width:49%;color:#FFFFFF;font-size:16px} +.search-main-w .date-main span.dates{width:100%;display:block;text-align:center;margin-bottom:12px;font-weight:bold} +.search-main-w .date-main span.weeks{margin-left:15px} +.search-main-w .weather-main{width:240px;height:100%;background-color:#01AAED;border-radius:6px;transition:0.3s all} +.site-main{width:100%;margin-top:30px} +.site-main .site-name{display:flex;justify-content:flex-start;align-items:center;align-self:center;font-size:18px;line-height:30px;font-weight:bold;margin-bottom:15px} +.site-main .site-name i{display:block;font-size:20px;margin-right:8px} +.site-main .site-name span{display:block;height:25px;width:25px;line-height:25px;text-align:center;background-color:#64a15e;border-radius:5px;margin-left:8px} +.site-main .site-name span i{color:#ffffff;text-align:center;font-size:14px;margin-right:0} +.site-main .site-name.hidden{display:none} +.site-main .site-list{display:flex;justify-content:space-between;flex-wrap:wrap} +.site-main .site-list .list{width:24%;background-color:#ffffff;border-radius:4px;transition:0.3s all;margin-bottom:15px;position:relative;display:flex;justify-content:flex-start;align-items:flex-start} +.site-main .site-list .list span{display:block;width:25px;height:25px;margin:auto;text-align:center;line-height:25px;position:absolute;top:0;bottom:0;right:0} +.site-main .site-list .list span i{display:block;color:#64a15e;font-size:18px} +.site-main .site-list .list a{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 5%} +.site-main .site-list .list p.name{color:#666666;font-weight:bold;width:60%;overflow:hidden;text-overflow:ellipsis;position:relative;padding-left:5px;font-size:15px;line-height:44px;white-space:nowrap} +.site-main .site-list .list p.name em{width:18px;height:18px;display:block;margin-right:10px;border-radius:100%;line-height:44px} +.site-main .site-list .list p.name img{width:18px;height:18px;margin:auto;position:absolute;left:0;top:0;bottom:0} +.site-main .site-list .list .desc{display:none;width:100%;font-size:13px;padding-bottom:10px;color:#666;line-height:1.5} +.site-main .site-list .list:hover{background-color:#00a2fda6;transition:0.3s all} +.site-main .site-list .list:hover p.name,.site-main .site-list .list:hover p.desc{color:#ffffff} +.site-main .site-list .list.hidden{display:none} +.site-main .site-list .list.visible{display:flex} +footer{width:100%;padding-left:240px;font-size:14px;color:#666;position:fixed;bottom:10px;left:0;margin:auto;text-align:center;height:auto;line-height:23px;margin-top:30px} +footer a{color:#666} +footer.show{position:static} +footer a:hover{color:#64a15e !important} +.tool-list{position:fixed;bottom:30px;right:15px;z-index:99;width:45px} +.tool-list .list{width:45px;height:45px;display:none;background-color:#00a2fda6;color:white;text-align:center;line-height:45px;border-radius:6px;cursor:pointer;margin-top:12px} +.tool-list .list i{font-size:20px} +.tool-list .addsite i{font-size:24px} +.addsiteBox{border-radius:6px !important;overflow:hidden} +.addsite-main{display:none;padding-bottom:15px;width:460px;margin:auto;background-color:#FFFFFF;box-shadow:0px 0px 6px #ccc;overflow:hidden} +.addsite-main .title{background-color:#64a15e;text-align:center;line-height:80px;color:#FFFFFF;font-weight:bold;font-size:22px;margin-bottom:20px;letter-spacing:2px} +.addsite-main .list-w{width:100%;padding:0 20px;display:flex;justify-content:space-between;flex-wrap:wrap} +.addsite-main .list{width:100%;margin-bottom:15px;position:relative} +.addsite-main .list span.icon{display:flex;justify-content:center;flex-direction:column;width:35px;text-align:center;height:100%;margin:auto;position:absolute;left:0;top:0;bottom:0} +.addsite-main .list span.icon i{color:#64a15e;display:block;font-size:18px} +.addsite-main .list input.text{display:block;width:100%;height:44px;padding:0 8px 0 35px;border-radius:6px;background-color:#f5f6fa;border:none;color:#555} +.addsite-main .list.type{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:center;margin-bottom:7px} +.addsite-main .list.type span{display:flex;justify-content:center;align-items:center;width:19%;text-align:center;padding:7px 0px;font-size:13px;border:1px solid #64a15e;cursor:pointer;border-radius:6px;margin-bottom:8px;transition:0.3s all} +.addsite-main .list.type span:hover,.addsite-main .list.type span.hover{background-color:#64a15e;color:#FFFFFF;transition:0.3s all} +.addsite-main .list-2{width:100%;display:flex;justify-content:space-between;align-items:center} +.addsite-main .list-2 .li{width:48%;display:flex;justify-content:space-between;align-items:center;line-height:40px;background-color:#f5f6fa;padding:0 10px;border-radius:6px;overflow:hidden} +.addsite-main .list-2 .li span{display:block;width:40%} +.addsite-main .list-2 .li input.num{display:block;width:60%;height:40px;padding:0 5px;background-color:#f5f6fa;border:none} +.addsite-main .list textarea{display:block;width:100%;height:80px;padding:10px;border-radius:6px;background-color:#f5f6fa;border:none;color:#555;line-height:1.4} +.addsite-main .list button{width:100%;display:block;height:44px;background-color:#64a15e;border:1px solid #64a15e;border-radius:6px;color:#FFFFFF;font-size:16px;cursor:pointer;transition:0.3s all} +.addsite-main .list button:hover{transition:0.3s all;box-shadow:0px 0px 6px #333333} +.addsite-main .layui-unselect,.addsite-main .layui-unselect *{box-sizing:content-box} +.addsite-main .layui-form-switch{margin-top:0} +.m-header{display:none} +@media only screen and (max-width:1200px){#word{top:340px} +.index-nav{left:-100%;transition:0.3s all} +.index-nav.show{left:0;transition:0.3s all} +.index-main{padding:15px !important} +.search-main-w{width:100%;margin-top:60px} +.search-main-w .date-main{} +#he-plugin-standard{padding:0px !important} +.search-main{width:100%;padding-top:25px;background-position:center} +.search-main .search-input{width:80%} +.search-main .search-btnlist{} +.search-main .search-btnlist .search-lists{font-size:13px} +.site-main .site-name{margin-bottom:10px} +.site-main .site-list .list{width:48%;margin-bottom:10px} +.site-main .site-list{margin-bottom:25px} +.site-main .site-list .list span{position:absolute;right:0px;top:0;bottom:0;margin:auto} +.site-main .site-list .list a{padding:0 10% 0 5%} +footer{padding-left:0} +.m-header{width:100%;padding:10px 15px;display:flex;justify-content:space-between;align-items:center;position:fixed;top:0;background-color:#FFFFFF;z-index:9999;box-shadow:0px 0px 1px #C0C4CC} +.m-header .logo{} +.m-header .logo img{display:block;height:100%} +.m-header .navbar{display:flex;justify-content:center;flex-direction:column;width:40px;height:40px;font-size:28px;text-align:center;border:1px solid #000;color:#000;border-radius:6px} +.m-navlist-w{width:100%;position:absolute;top:100%;left:0;right:0;background-color:#FFFFFF;padding:15px;display:none;border-top:1px solid #C0C4CC} +.m-navlist{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:center} +.m-navlist a.list{width:33%;padding:0 10px;line-height:40px;display:flex;justify-content:flex-start;align-items:center} +.m-navlist a.list i{display:block;margin-right:4px} +.addsite-main{width:100%} +.addsite-main .list.type span{width:32%} +} \ No newline at end of file diff --git a/template/baisu/index.php b/template/baisu/index.php new file mode 100644 index 0000000..e51783a --- /dev/null +++ b/template/baisu/index.php @@ -0,0 +1,218 @@ + + + + + + + + + + + + + <?php echo $conf['title']?> + + + + + + + + + + + + +
        + + + +
        + query("SELECT * FROM `lylme_tags`"); +while ($taglists = $DB->fetch($tagslists)) { + echo ' + '; +} +?> +

        分组

        +query("SELECT * FROM `lylme_groups` ORDER BY `group_order` ASC"); +while ($group = $DB->fetch($groups)) { + echo ''; +} +?> +
        +
        + + +
        + +
        +
        > + + 2022年01月01日 +
        + 辛丑年十一月廿九 + + 星期六 +
        +
        +
        +
        + +
        +
        + + +
        +
        +query("SELECT * FROM `lylme_sou` ORDER BY `lylme_sou`.`sou_order` ASC"); +while ($soulist = $DB->fetch($soulists)) { + if ($soulist["sou_st"] == 1) { + if(!$fso) { + echo ' + +
        '; + $fso = true; + } + echo '
        '. $soulist["sou_icon"] . $soulist["sou_name"] . ' +
        '; + } +} +?> + +
        +
        +
        + +
        + + + + +
        + ' . yan().'

        '; +} + + +include'list.php';?> +
        + +
        +
        + + + + + +
        +
        + +
        +
        + + + + + + + .search-main-w {display: none;} @media only screen and (max-width: 1200px){.search-main {padding-top:70px !important;}}';}?> + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/template/baisu/js/common.js b/template/baisu/js/common.js new file mode 100644 index 0000000..0c0b63e --- /dev/null +++ b/template/baisu/js/common.js @@ -0,0 +1,224 @@ +var bodyH = $('.index-main').height(); +var winH = $(window).height() - 100; +if(bodyH > winH) { + $('footer').addClass('show'); +}; + +// layui.use(['dropdown', 'layer', 'form'], function() { +// var dropdown = layui.dropdown, +// layer = layui.layer, +// form = layui.form, +// $ = layui.jquery; +// }) +//搜索引擎切换 +function searchChange() { + $(".search-change").click(function() { + $('.search-lists').toggleClass('hide'); +// console.log('1') + }); + $(".search-lists .list").click(function() { + var souurl = $(this).data('url'); + var text = $(this).html(); + $('.search-btn').html(text); + $('.search-btn').attr('data-url', souurl); + $('.search-lists').addClass('hide'); + console.log(souurl); + + }); + $(".search-btn").click(function() { + var url = $(this).attr('data-url'); + var kw = $('#search').val(); + if(kw !== "") { + window.open(url + kw); + } else { + layer.msg('未输入搜索框关键词!', { + time: 1000, + }); + } + }); +} +searchChange(); +//回车键、本地搜索 +function keyClick() { + $('body').keyup(function(e) { + if(e.keyCode === 13) { + var isFocus = $("#search").is(":focus"); + if(true == isFocus) { + // console.log(isFocus); + var url = $('.search-btn').attr('data-url'); + var kw = $('#search').val(); + if(kw !== "") { + window.open(url + kw); + } else { + layer.msg('未输入搜索框关键词!', { + time: 1000, + }); + } + } + } + }); + $("#search").focus(function(data, status) { + $('.search-lists').addClass('hide'); + }); + $("#search").blur(function(data, status) { + if($("#search").val() == '') { + $(".site-name").removeClass("hidden"); + }; + }); + var h = holmes({ + input: '#search', + find: '.urllist', + placeholder: '
        未搜索到匹配结果!
        ', + mark: false, + hiddenAttr: true, + class: { + visible: 'visible', + hidden: 'hidden' + }, + onFound(el) { + $(".site-name").addClass("hidden"); + }, + onInput(el) { + $(".site-name").addClass("hidden"); + }, + onVisible(el) { + $(".site-name").removeClass("hidden"); + }, + onEmpty(el) { + $(".site-name").removeClass("hidden"); + }, + }); + +} +keyClick(); + +//锚点、返回顶部 +$("a.catlist").click(function() { + $("html, body").animate({ + scrollTop: $($(this).attr("href")).offset().top - 5 + "px" + }, 500); + return false; +}); +$('.scroll_top').click(function() { + $('html,body').animate({ + scrollTop: '0px' + }, 500); +}); +$(window).scroll(function() { + if($(window).scrollTop() >= 100) { + $(".scroll_top").fadeIn(1000); + } else { + $(".scroll_top").stop(true, true).fadeOut(1000); + } +}); + +//时间 +function getNow(Mytime) { + return Mytime < 10 ? '0' + Mytime : Mytime; +} + +function CurrentTime() { + var myDate = new Date(); + //获取当前小时数(0-23) + var h = myDate.getHours(); + //获取当前分钟数(0-59) + var m = myDate.getMinutes(); + //获取当前秒数(0-59) + var s = myDate.getSeconds(); + var nowTime = getNow(h) + ':' + getNow(m) + ":" + getNow(s); + $('#nowTime').text(nowTime); + setTimeout("CurrentTime()", 1000); //设定定时器,循环运行 +} +CurrentTime(); + +var myDate = new Date(); +//获取当前年份 +var year = myDate.getFullYear(); +//获取当前月份 +var month = myDate.getMonth() + 1; +//获取当前日期 +var date = myDate.getDate(); +var nowDate = year + ' 年 ' + getNow(month) + " 月 " + getNow(date) + " 日"; +$('#nowYmd').text(nowDate); + +$('.date-main').click(function() { + window.open('https://wannianli.tianqi.com/'); +}); +//获取农历 +var lunarD = Lunar.fromDate(myDate); +// console.log(lunarD); +var lunarNowDate = lunarD.getYearInGanZhi() + '年' + lunarD.getMonthInChinese() + "月" + lunarD.getDayInChinese(); +$('#nowLunar').text(lunarNowDate); + +//获取星期 +var nowWeek = lunarD.getWeekInChinese(); +$('#nowWeek').text('星期' + nowWeek); + +//手机端 +$(".navbar").click(function() { + $(".m-navlist-w").slideToggle(); + $(this).toggleClass("hover"); +}); +$(".m-navlist a.list").click(function() { + $(".m-navlist-w").slideUp(); +}); + + + $(function() { + //当键盘键被松开时发送Ajax获取数据 + $('#search').keyup(function() { + var keywords = $(this).val(); + if (keywords == '') { $('#word').hide(); return }; + $.ajax({ + url: 'https://suggestion.baidu.com/su?wd=' + keywords, + dataType: 'jsonp', + jsonp: 'cb', //回调函数的参数名(键值)key + // jsonpCallback: 'fun', //回调函数名(值) value + beforeSend: function() { + // $('#word').append('
      • 正在加载。。。
      • '); + }, + success: function(data) { + $('#word').empty().show(); + if (data.s == '') { + // $('#word').append('
        暂无 ' + keywords + ' 相关索引
        '); + $('#word').empty(); + $('#word').hide(); + } + $.each(data.s, function() { + $('#word').append('
      • ' + this + '
      • '); + }) + }, + error: function() { + $('#word').empty().show(); + //$('#word').append('
        Fail "' + keywords + '"
        '); + $('#word').hide(); + } + }) + }) + //点击搜索数据复制给搜索框 + $(document).on('click', '#word li', function() { + var word = $(this).text(); + $('#search').val(word); + $('#word').empty(); + $('#word').hide(); + //$("form").submit(); + $('.search-btn').trigger('click');//触发搜索事件 + }) + $(document).on('click', '.container,.banner-video,nav', function() { + $('#word').empty(); + $('#word').hide(); + }) + +}) + + $(function () { + + //点击空白处隐藏弹出层。 + $(document).click(function(event){ + var _con = $('#word'); // 设置目标区域 + if(!_con.is(event.target) && _con.has(event.target).length === 0){ // Mark 1 + //$('#word').slideUp('slow'); //滑动消失 + $('#word').hide(300); //淡出消失 + } + }); + }) diff --git a/template/baisu/js/holmes.js b/template/baisu/js/holmes.js new file mode 100644 index 0000000..ab2bc6c --- /dev/null +++ b/template/baisu/js/holmes.js @@ -0,0 +1 @@ +(function(a,b){'object'==typeof exports&&'undefined'!=typeof module?module.exports=b():'function'==typeof define&&define.amd?define(b):a.holmes=b()})(this,function(){'use strict';var f='undefined'==typeof window?global:window,g=function(c,a){return-1!==c.indexOf(a)},h='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},i=function(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')},b=function(){function a(a,b){for(var c,d=0;d or contenteditable.',optionsObject:'The options need to be given inside an object like this:\n\nnew Holmes({\n find:".result"\n});\n\nsee also https://haroen.me/holmes/doc/holmes.html',findOption:'A find argument is needed. That should be a querySelectorAll for each of the items you want to match individually. You should have something like:\n\nnew Holmes({\n find:".result"\n});\n\nsee also https://haroen.me/holmes/doc/holmes.html',noInput:'Your Holmes.input didn\'t match a querySelector',impossiblePlaceholder:'The Holmes placeholder couldn\'t be put; the elements had no parent.'},a=function(){function f(a){var k=this;i(this,f);var c=!1;if('object'!==('undefined'==typeof a?'undefined':h(a)))throw new Error(j.optionsObject);if('string'!=typeof a.find)throw new Error(j.findOption);var d={input:'input[type=search]',find:'',placeholder:void 0,mark:!1,class:{visible:void 0,hidden:'hidden'},dynamic:!1,minCharacters:0,hiddenAttr:!1,shouldShow:g,onHidden:void 0,onVisible:void 0,onEmpty:void 0,onFound:void 0,onInput:void 0};this.options=Object.assign({},d,a),this.options.class=Object.assign({},d.class,a.class),this.hidden=0,this.running=!1,window.addEventListener('DOMContentLoaded',function(){return k.start()}),this.search=function(){k.running=!0;var d=!1;k.searchString=k.inputString(),k.options.minCharacters&&0!==k.searchString.length&&k.options.minCharacters>k.searchString.length||(k.options.dynamic&&(k.elements=document.querySelectorAll(k.options.find),k.elementsLength=k.elements.length,k.elementsArray=Array.prototype.slice.call(k.elements)),k.options.mark&&(k._regex=new RegExp('('+k.searchString+')(?![^<]*>)','gi')),k.elementsArray.forEach(function(a){k.options.shouldShow(a.textContent.toLowerCase(),k.searchString)?(k._showElement(a),c&&'function'==typeof k.options.onFound&&k.options.onFound(k.placeholderNode),d=!0):k._hideElement(a)}),'function'==typeof k.options.onInput&&k.options.onInput(k.searchString),d?k.options.placeholder&&k._hideElement(k.placeholderNode):(k.options.placeholder&&k._showElement(k.placeholderNode),!1==c&&(c=!0,'function'==typeof k.options.onEmpty&&k.options.onEmpty(k.placeholderNode))))}}return b(f,[{key:'_hideElement',value:function(b){this.options.class.visible&&b.classList.remove(this.options.class.visible),b.classList.contains(this.options.class.hidden)||(b.classList.add(this.options.class.hidden),this.hidden++,'function'==typeof this.options.onHidden&&this.options.onHidden(b)),this.options.hiddenAttr&&b.setAttribute('hidden','true'),this.options.mark&&(b.innerHTML=b.innerHTML.replace(/<\/?mark>/g,''))}},{key:'_showElement',value:function(b){this.options.class.visible&&b.classList.add(this.options.class.visible),b.classList.contains(this.options.class.hidden)&&(b.classList.remove(this.options.class.hidden),this.hidden--,'function'==typeof this.options.onVisible&&this.options.onVisible(b)),this.options.hiddenAttr&&b.removeAttribute('hidden'),this.options.mark&&(b.innerHTML=b.innerHTML.replace(/<\/?mark>/g,''),this.searchString.length&&(b.innerHTML=b.innerHTML.replace(this._regex,'$1')))}},{key:'_inputHandler',value:function(){console.warn('You can now directly call .search() to refresh the results'),this.search()}},{key:'inputString',value:function(){if(this.input instanceof HTMLInputElement)return this.input.value.toLowerCase();if(this.input.isContentEditable)return this.input.textContent.toLowerCase();throw new Error(j.invalidInput)}},{key:'setInput',value:function(b){if(this.input instanceof HTMLInputElement)this.input.value=b;else if(this.input.isContentEditable)this.input.textContent=b;else throw new Error(j.invalidInput)}},{key:'start',value:function(){var d=document.querySelector(this.options.input);if(d instanceof HTMLElement)this.input=d;else throw new Error(j.noInput);if('string'==typeof this.options.find)this.elements=document.querySelectorAll(this.options.find);else throw new Error(j.findOption);if(this.elementsLength=this.elements.length,this.elementsArray=Array.prototype.slice.call(this.elements),this.hidden=0,'string'==typeof this.options.placeholder){var a=this.options.placeholder;if(this.placeholderNode=document.createElement('div'),this.placeholderNode.id='holmes-placeholder',this._hideElement(this.placeholderNode),this.placeholderNode.innerHTML=a,this.elements[0].parentNode instanceof Element)this.elements[0].parentNode.appendChild(this.placeholderNode);else throw new Error(j.impossiblePlaceholder)}if(this.options.class.visible){var b=this.options.class.visible;this.elementsArray.forEach(function(c){c.classList.add(b)})}this.input.addEventListener('input',this.search)}},{key:'stop',value:function(){var d=this;return new Promise(function(a,b){try{d.input.removeEventListener('input',d.search),d.options.placeholder&&(d.placeholderNode.parentNode?d.placeholderNode.parentNode.removeChild(d.placeholderNode):b(new Error(j.impossiblePlaceholder))),d.options.mark&&d.elementsArray.forEach(function(b){b.innerHTML=b.innerHTML.replace(/<\/?mark>/g,'')}),d.running=!1,a('This instance of Holmes has been stopped.')}catch(c){b(c)}})}},{key:'clear',value:function(){var c=this;this.setInput(''),this.elementsArray.forEach(function(a){c._showElement(a)}),this.options.placeholder&&this._hideElement(this.placeholderNode),this.hidden=0}},{key:'count',value:function(){return{all:this.elementsLength,hidden:this.hidden,visible:this.elementsLength-this.hidden}}}]),f}(),c=function(g){var a=function(){for(var a,b=arguments.length,c=Array(b),d=0;d by) { + days = SolarUtil.getDaysOfYear(by) - SolarUtil.getDaysInYear(by, bm, bd); + for (i = by + 1; i < ay; i++) { + days += SolarUtil.getDaysOfYear(i); + } + days += SolarUtil.getDaysInYear(ay, am, ad); + n = -days; + } else { + days = SolarUtil.getDaysOfYear(ay) - SolarUtil.getDaysInYear(ay, am, ad); + for (i = ay + 1; i < by; i++) { + days += SolarUtil.getDaysOfYear(i); + } + days += SolarUtil.getDaysInYear(by, bm, bd); + n = days; + } + return n; + }, + getDaysBetween:function(date0, date1){ + return this.getDaysBetweenYmd(date0.getFullYear(), date0.getMonth() + 1, date0.getDate(), date1.getFullYear(), date1.getMonth() + 1, date1.getDate()); + } + }; + })(); + var Solar = (function(){ + var _fromDate = function(date){ + return _fromYmdHms(date.getFullYear(),date.getMonth()+1,date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds()); + }; + var _fromJulianDay = function(julianDay){ + var d = Math.floor(julianDay + 0.5); + var f = julianDay + 0.5 - d; + var c; + + if (d >= 2299161) { + c = Math.floor((d - 1867216.25) / 36524.25); + d += 1 + c - Math.floor(c / 4); + } + d += 1524; + var year = Math.floor((d - 122.1) / 365.25); + d -= Math.floor(365.25 * year); + var month = Math.floor(d / 30.601); + d -= Math.floor(30.601 * month); + var day = d; + if (month > 13) { + month -= 13; + year -= 4715; + } else { + month -= 1; + year -= 4716; + } + f *= 24; + var hour = Math.floor(f); + + f -= hour; + f *= 60; + var minute = Math.floor(f); + + f -= minute; + f *= 60; + var second = Math.round(f); + if(second>59){ + second-=60; + minute++; + } + if(minute>59){ + minute-=60; + hour++; + } + return _fromYmdHms(year,month,day,hour,minute,second); + }; + var _fromYmdHms = function(y,m,d,hour,minute,second){ + if(y===1582&&m===10){ + if(d>=15){ + d -= 10; + } + } + return { + _p:{ + year:y, + month:m, + day:d, + hour:hour, + minute:minute, + second:second, + calendar:ExactDate.fromYmdHms(y,m,d,hour,minute,second) + }, + getYear:function(){ + return this._p.year; + }, + getMonth:function(){ + return this._p.month; + }, + getDay:function(){ + return this._p.day; + }, + getHour:function(){ + return this._p.hour; + }, + getMinute:function(){ + return this._p.minute; + }, + getSecond:function(){ + return this._p.second; + }, + getWeek:function(){ + return this._p.calendar.getDay(); + }, + getWeekInChinese:function(){ + return SolarUtil.WEEK[this.getWeek()]; + }, + /** + * 获取当天的阳历周 + * @param start 星期几作为一周的开始,1234560分别代表星期一至星期天 + */ + getSolarWeek:function(start){ + return SolarWeek.fromDate(this._p.calendar,start); + }, + isLeapYear:function(){ + return SolarUtil.isLeapYear(this._p.year); + }, + getFestivals:function(){ + var l = []; + var f = SolarUtil.FESTIVAL[this._p.month+'-'+this._p.day]; + if(f){ + l.push(f); + } + var weeks = Math.ceil(this._p.day/7); + var week = this.getWeek(); + f = SolarUtil.WEEK_FESTIVAL[this._p.month+'-'+weeks+'-'+week]; + if(f){ + l.push(f); + } + return l; + }, + getOtherFestivals:function(){ + var l=[]; + var fs=SolarUtil.OTHER_FESTIVAL[this._p.month+'-'+this._p.day]; + if(fs){ + l=l.concat(fs); + } + return l; + }, + getXingzuo:function(){ + return this.getXingZuo(); + }, + getXingZuo:function(){ + var index = 11; + var y = this._p.month*100+this._p.day; + if (y >= 321 && y <= 419) { + index = 0; + } else if (y >= 420 && y <= 520) { + index = 1; + } else if (y >= 521 && y <= 621) { + index = 2; + } else if (y >= 622 && y <= 722) { + index = 3; + } else if (y >= 723 && y <= 822) { + index = 4; + } else if (y >= 823 && y <= 922) { + index = 5; + } else if (y >= 923 && y <= 1023) { + index = 6; + } else if (y >= 1024 && y <= 1122) { + index = 7; + } else if (y >= 1123 && y <= 1221) { + index = 8; + } else if (y >= 1222 || y <= 119) { + index = 9; + } else if (y <= 218) { + index = 10; + } + return SolarUtil.XINGZUO[index]; + }, + toYmd:function(){ + var d = this._p.day; + if(this._p.year===1582&&this._p.month===10){ + if(d>=5){ + d += 10; + } + } + var y = this._p.year + ''; + while (y.length < 4) { + y = '0' + y; + } + return [y,(this._p.month<10?'0':'')+this._p.month,(d<10?'0':'')+d].join('-'); + }, + toYmdHms:function(){ + return this.toYmd()+' '+[(this._p.hour<10?'0':'')+this._p.hour,(this._p.minute<10?'0':'')+this._p.minute,(this._p.second<10?'0':'')+this._p.second].join(':'); + }, + toString:function(){ + return this.toYmd(); + }, + toFullString:function(){ + var s = this.toYmdHms(); + if(this.isLeapYear()){ + s += ' 闰年'; + } + s += ' 星期'+this.getWeekInChinese(); + var festivals = this.getFestivals(); + for(var i=0,j=festivals.length;i 0){ + date.setDate(date.getDate() + add); + var work = true; + var holiday = HolidayUtil.getHoliday(date.getFullYear(), date.getMonth() + 1, date.getDate()); + if(!holiday){ + var week = date.getDay(); + if(0 === week || 6 === week){ + work = false; + } + }else{ + work = holiday.isWork(); + } + if(work){ + rest--; + } + } + } + } + return _fromDate(date); + }, + getLunar:function(){ + return Lunar.fromDate(this._p.calendar); + }, + getJulianDay:function(){ + var y = this._p.year; + var m = this._p.month; + var d = this._p.day + ((this._p.second / 60 + this._p.minute) / 60 + this._p.hour) / 24; + var n = 0; + var g = false; + if (y * 372 + m * 31 + Math.floor(d) >= 588829) { + g = true; + } + if (m <= 2) { + m += 12; + y--; + } + if (g) { + n = Math.floor(y / 100); + n = 2 - n + Math.floor(n / 4); + } + return Math.floor(365.25 * (y + 4716)) + Math.floor(30.6001 * (m + 1)) + d + n - 1524.5; + }, + getCalendar:function(){ + return this._p.calendar; + } + }; + }; + var _fromBaZi=function(yearGanZhi,monthGanZhi,dayGanZhi,timeGanZhi,sect,baseYear){ + sect = (1==sect)?1:2; + baseYear = (undefined==baseYear)?1900:baseYear; + var l = []; + var today = _fromDate(new Date()); + var lunar = today.getLunar(); + var offsetYear = LunarUtil.getJiaZiIndex(lunar.getYearInGanZhiExact())-LunarUtil.getJiaZiIndex(yearGanZhi); + if(offsetYear<0){ + offsetYear = offsetYear+60; + } + var startYear = lunar.getYear() - offsetYear; + var hour = 0; + var timeZhi = timeGanZhi.substr(1); + for(var i=0,j=LunarUtil.ZHI.length;i=baseYear){ + var year = startYear-1; + var counter = 0; + var month = 12; + var day; + var solar; + var found = false; + while (counter < 15) { + if(year>=baseYear){ + day = 1; + solar = _fromYmdHms(year, month, day, hour, 0, 0); + lunar = solar.getLunar(); + if(lunar.getYearInGanZhiExact()===yearGanZhi && lunar.getMonthInGanZhiExact()===monthGanZhi){ + found = true; + break; + } + } + month++; + if(month > 12){ + month = 1; + year++; + } + counter++; + } + if(found){ + counter = 0; + month--; + if(month<1){ + month = 12; + year--; + } + day = 1; + solar = _fromYmdHms(year, month, day, hour, 0, 0); + while (counter < 61) { + lunar = solar.getLunar(); + var dgz = (2==sect)?lunar.getDayInGanZhiExact2():lunar.getDayInGanZhiExact(); + if (lunar.getYearInGanZhiExact()===yearGanZhi && lunar.getMonthInGanZhiExact()===monthGanZhi && dgz===dayGanZhi && lunar.getTimeInGanZhi()===timeGanZhi) { + l.push(solar); + break; + } + solar = solar.next(1); + counter++; + } + } + startYear -= 60; + } + return l; + }; + return { + J2000:2451545, + fromYmd:function(y,m,d){return _fromYmdHms(y,m,d,0,0,0);}, + fromYmdHms:function(y,m,d,hour,minute,second){return _fromYmdHms(y,m,d,hour,minute,second);}, + fromDate:function(date){return _fromDate(date);}, + fromJulianDay:function(julianDay){return _fromJulianDay(julianDay);}, + fromBaZi:function(yearGanZhi,monthGanZhi,dayGanZhi,timeGanZhi,sect,baseYear){return _fromBaZi(yearGanZhi,monthGanZhi,dayGanZhi,timeGanZhi,sect,baseYear);} + }; + })(); + var Lunar = (function(){ + var _computeJieQi = function(o,ly) { + o['jieQiList'] = []; + o['jieQi'] = {}; + var julianDays = ly.getJieQiJulianDays(); + for (var i = 0, j = Lunar.JIE_QI_IN_USE.length; i < j; i++) { + var key = Lunar.JIE_QI_IN_USE[i]; + o['jieQiList'].push(key); + o['jieQi'][key] = Solar.fromJulianDay(julianDays[i]); + } + }; + var _computeYear = function(o,solar,year){ + //以正月初一开始 + var offset = year - 4; + var yearGanIndex = offset % 10; + var yearZhiIndex = offset % 12; + + if (yearGanIndex < 0) { + yearGanIndex += 10; + } + + if (yearZhiIndex < 0) { + yearZhiIndex += 12; + } + + //以立春作为新一年的开始的干支纪年 + var g = yearGanIndex; + var z = yearZhiIndex; + + //精确的干支纪年,以立春交接时刻为准 + var gExact = yearGanIndex; + var zExact = yearZhiIndex; + + var solarYear = solar.getYear(); + var solarYmd = solar.toYmd(); + var solarYmdHms = solar.toYmdHms(); + + //获取立春的阳历时刻 + var liChun = o['jieQi']['立春']; + if (liChun.getYear() != solarYear) { + liChun = o['jieQi']['LI_CHUN']; + } + var liChunYmd = liChun.toYmd(); + var liChunYmdHms = liChun.toYmdHms(); + + //阳历和阴历年份相同代表正月初一及以后 + if(year===solarYear){ + //立春日期判断 + if(solarYmd=liChunYmd) { + g++; + z++; + } + if(solarYmdHms>=liChunYmdHms) { + gExact++; + zExact++; + } + } + + o['yearGanIndex'] = yearGanIndex; + o['yearZhiIndex'] = yearZhiIndex; + o['yearGanIndexByLiChun'] = (g<0?g+10:g)%10; + o['yearZhiIndexByLiChun'] = (z<0?z+12:z)%12; + o['yearGanIndexExact'] = (gExact<0?gExact+10:gExact)%10; + o['yearZhiIndexExact'] = (zExact<0?zExact+12:zExact)%12; + }; + var _computeMonth = function(o,solar){ + var start = null; + var i; + var end; + var size = Lunar.JIE_QI_IN_USE.length; + + //序号:大雪以前-3,大雪到小寒之间-2,小寒到立春之间-1,立春之后0 + var index = -3; + for(i=0;i=symd&&ymd=stime&&time='23:00'&&hm<='23:59'){ + dayGanExact++; + if(dayGanExact>=10){ + dayGanExact -= 10; + } + dayZhiExact++; + if(dayZhiExact>=12){ + dayZhiExact -= 12; + } + } + o['dayGanIndexExact'] = dayGanExact; + o['dayZhiIndexExact'] = dayZhiExact; + }; + var _computeTime = function(o,hour,minute){ + var timeZhiIndex = LunarUtil.getTimeZhiIndex((hour<10?'0':'')+hour+':'+(minute<10?'0':'')+minute); + o['timeZhiIndex'] = timeZhiIndex; + o['timeGanIndex'] = (o['dayGanIndexExact']%5*2+timeZhiIndex)%10; + }; + var _computeWeek = function(o,solar){ + o['weekIndex'] = solar.getWeek(); + }; + var _compute = function(year,hour,minute,second,solar,ly){ + var o = {}; + _computeJieQi(o, ly); + _computeYear(o, solar, year); + _computeMonth(o, solar); + _computeDay(o, solar, hour, minute); + _computeTime(o, hour, minute); + _computeWeek(o, solar); + return o; + }; + var _fromDate = function(date){ + var currentYear = date.getFullYear(); + var currentMonth = date.getMonth() + 1; + var currentDay = date.getDate(); + var lunarYear = 0; + var lunarMonth = 0; + var lunarDay = 0; + var ly = LunarYear.fromYear(currentYear); + var lms = ly.getMonths(); + for (var i = 0, j = lms.length; i < j; i++) { + var m = lms[i]; + // 初一 + var firstDay = Solar.fromJulianDay(m.getFirstJulianDay()); + var days = ExactDate.getDaysBetweenYmd(firstDay.getYear(), firstDay.getMonth(), firstDay.getDay(), currentYear, currentMonth, currentDay); + if (days < m.getDayCount()) { + lunarYear = m.getYear(); + lunarMonth = m.getMonth(); + lunarDay = days + 1; + break; + } + } + return _new(lunarYear, lunarMonth, lunarDay, date.getHours(), date.getMinutes(), date.getSeconds(), Solar.fromDate(date), ly); + }; + var _fromYmdHms = function(lunarYear,lunarMonth,lunarDay,hour,minute,second) { + var y = LunarYear.fromYear(lunarYear); + var m = y.getMonth(lunarMonth); + if (null == m) { + throw 'wrong lunar year '+lunarYear+' month '+lunarMonth; + } + if (lunarDay < 1) { + throw 'lunar day must bigger than 0'; + } + var days = m.getDayCount(); + if (lunarDay > days) { + throw 'only '+days+' days in lunar year '+lunarYear+' month '+lunarMonth; + } + var noon = Solar.fromJulianDay(m.getFirstJulianDay() + lunarDay - 1); + var solar = Solar.fromYmdHms(noon.getYear(), noon.getMonth(), noon.getDay(), hour, minute, second); + return _new(lunarYear, lunarMonth, lunarDay, hour, minute, second, solar, y); + }; + var _new = function(year,month,day,hour,minute,second,solar,ly){ + var gz = _compute(year,hour,minute,second,solar,ly); + return { + _p:{ + year:year, + month:month, + day:day, + hour:hour, + minute:minute, + second:second, + timeGanIndex:gz.timeGanIndex, + timeZhiIndex:gz.timeZhiIndex, + dayGanIndex:gz.dayGanIndex, + dayZhiIndex:gz.dayZhiIndex, + dayGanIndexExact:gz.dayGanIndexExact, + dayZhiIndexExact:gz.dayZhiIndexExact, + dayGanIndexExact2:gz.dayGanIndexExact2, + dayZhiIndexExact2:gz.dayZhiIndexExact2, + monthGanIndex:gz.monthGanIndex, + monthZhiIndex:gz.monthZhiIndex, + monthGanIndexExact:gz.monthGanIndexExact, + monthZhiIndexExact:gz.monthZhiIndexExact, + yearGanIndex:gz.yearGanIndex, + yearZhiIndex:gz.yearZhiIndex, + yearGanIndexByLiChun:gz.yearGanIndexByLiChun, + yearZhiIndexByLiChun:gz.yearZhiIndexByLiChun, + yearGanIndexExact:gz.yearGanIndexExact, + yearZhiIndexExact:gz.yearZhiIndexExact, + weekIndex:gz.weekIndex, + jieQi:gz.jieQi, + jieQiList:gz.jieQiList, + solar:solar, + eightChar:null + }, + getYear:function(){return this._p.year;}, + getMonth:function(){return this._p.month;}, + getDay:function(){return this._p.day;}, + getHour:function(){return this._p.hour;}, + getMinute:function(){return this._p.minute;}, + getSecond:function(){return this._p.second;}, + getTimeGanIndex:function(){return this._p.timeGanIndex;}, + getTimeZhiIndex:function(){return this._p.timeZhiIndex;}, + getDayGanIndex:function(){return this._p.dayGanIndex;}, + getDayGanIndexExact:function(){return this._p.dayGanIndexExact;}, + getDayGanIndexExact2:function(){return this._p.dayGanIndexExact2;}, + getDayZhiIndex:function(){return this._p.dayZhiIndex;}, + getDayZhiIndexExact:function(){return this._p.dayZhiIndexExact;}, + getDayZhiIndexExact2:function(){return this._p.dayZhiIndexExact2;}, + getMonthGanIndex:function(){return this._p.monthGanIndex;}, + getMonthGanIndexExact:function(){return this._p.monthGanIndexExact;}, + getMonthZhiIndex:function(){return this._p.monthZhiIndex;}, + getMonthZhiIndexExact:function(){return this._p.monthZhiIndexExact;}, + getYearGanIndex:function(){return this._p.yearGanIndex;}, + getYearGanIndexByLiChun:function(){return this._p.yearGanIndexByLiChun;}, + getYearGanIndexExact:function(){return this._p.yearGanIndexExact;}, + getYearZhiIndex:function(){return this._p.yearZhiIndex;}, + getYearZhiIndexByLiChun:function(){return this._p.yearZhiIndexByLiChun;}, + getYearZhiIndexExact:function(){return this._p.yearZhiIndexExact;}, + getGan:function(){return this.getYearGan();}, + getZhi:function(){return this.getYearZhi();}, + getYearGan:function(){return LunarUtil.GAN[this._p.yearGanIndex+1];}, + getYearGanByLiChun:function(){return LunarUtil.GAN[this._p.yearGanIndexByLiChun+1];}, + getYearGanExact:function(){return LunarUtil.GAN[this._p.yearGanIndexExact+1];}, + getYearZhi:function(){return LunarUtil.ZHI[this._p.yearZhiIndex+1];}, + getYearZhiByLiChun:function(){return LunarUtil.ZHI[this._p.yearZhiIndexByLiChun+1];}, + getYearZhiExact:function(){return LunarUtil.ZHI[this._p.yearZhiIndexExact+1];}, + getYearInGanZhi:function(){return this.getYearGan()+this.getYearZhi();}, + getYearInGanZhiByLiChun:function(){return this.getYearGanByLiChun()+this.getYearZhiByLiChun();}, + getYearInGanZhiExact:function(){return this.getYearGanExact()+this.getYearZhiExact();}, + getMonthGan:function(){return LunarUtil.GAN[this._p.monthGanIndex+1];}, + getMonthGanExact:function(){return LunarUtil.GAN[this._p.monthGanIndexExact+1];}, + getMonthZhi:function(){return LunarUtil.ZHI[this._p.monthZhiIndex+1];}, + getMonthZhiExact:function(){return LunarUtil.ZHI[this._p.monthZhiIndexExact+1];}, + getMonthInGanZhi:function(){return this.getMonthGan()+this.getMonthZhi();}, + getMonthInGanZhiExact:function(){return this.getMonthGanExact()+this.getMonthZhiExact();}, + getDayGan:function(){return LunarUtil.GAN[this._p.dayGanIndex+1];}, + getDayGanExact:function(){return LunarUtil.GAN[this._p.dayGanIndexExact+1];}, + getDayGanExact2:function(){return LunarUtil.GAN[this._p.dayGanIndexExact2+1];}, + getDayZhi:function(){return LunarUtil.ZHI[this._p.dayZhiIndex+1];}, + getDayZhiExact:function(){return LunarUtil.ZHI[this._p.dayZhiIndexExact+1];}, + getDayZhiExact2:function(){return LunarUtil.ZHI[this._p.dayZhiIndexExact2+1];}, + getDayInGanZhi:function(){return this.getDayGan()+this.getDayZhi();}, + getDayInGanZhiExact:function(){return this.getDayGanExact()+this.getDayZhiExact();}, + getDayInGanZhiExact2:function(){return this.getDayGanExact2()+this.getDayZhiExact2();}, + getTimeGan:function(){return LunarUtil.GAN[this._p.timeGanIndex+1];}, + getTimeZhi:function(){return LunarUtil.ZHI[this._p.timeZhiIndex+1];}, + getTimeInGanZhi:function(){return this.getTimeGan()+this.getTimeZhi();}, + getShengxiao:function(){return this.getYearShengXiao();}, + getYearShengXiao:function(){return LunarUtil.SHENGXIAO[this._p.yearZhiIndex+1];}, + getYearShengXiaoByLiChun:function(){return LunarUtil.SHENGXIAO[this._p.yearZhiIndexByLiChun+1];}, + getYearShengXiaoExact:function(){return LunarUtil.SHENGXIAO[this._p.yearZhiIndexExact+1];}, + getMonthShengXiao:function(){return LunarUtil.SHENGXIAO[this._p.monthZhiIndex+1];}, + getMonthShengXiaoExact:function(){return LunarUtil.SHENGXIAO[this._p.monthZhiIndexExact+1];}, + getDayShengXiao:function(){return LunarUtil.SHENGXIAO[this._p.dayZhiIndex+1];}, + getTimeShengXiao:function(){return LunarUtil.SHENGXIAO[this._p.timeZhiIndex+1];}, + getYearInChinese:function(){ + var y = this._p.year+''; + var s = ''; + var zero = '0'.charCodeAt(0); + for(var i=0,j=y.length;i= 29 && this._p.year != this.next(1).getYear()) { + l.push('除夕'); + } + return l; + }, + getOtherFestivals:function(){ + var l=[]; + var fs=LunarUtil.OTHER_FESTIVAL[this._p.month+'-'+this._p.day]; + if(fs){ + l=l.concat(fs); + } + if(this._p.solar.toYmd()===this._p.jieQi['清明'].next(-1).toYmd()){ + l.push('寒食节'); + } + return l; + }, + getBaZi:function(){ + var bz = this.getEightChar(); + var l = []; + l.push(bz.getYear()); + l.push(bz.getMonth()); + l.push(bz.getDay()); + l.push(bz.getTime()); + return l; + }, + getBaZiWuXing:function(){ + var bz = this.getEightChar(); + var l = []; + l.push(bz.getYearWuXing()); + l.push(bz.getMonthWuXing()); + l.push(bz.getDayWuXing()); + l.push(bz.getTimeWuXing()); + return l; + }, + getBaZiNaYin:function(){ + var bz = this.getEightChar(); + var l = []; + l.push(bz.getYearNaYin()); + l.push(bz.getMonthNaYin()); + l.push(bz.getDayNaYin()); + l.push(bz.getTimeNaYin()); + return l; + }, + getBaZiShiShenGan:function(){ + var bz = this.getEightChar(); + var l = []; + l.push(bz.getYearShiShenGan()); + l.push(bz.getMonthShiShenGan()); + l.push(bz.getDayShiShenGan()); + l.push(bz.getTimeShiShenGan()); + return l; + }, + getBaZiShiShenZhi:function(){ + var bz = this.getEightChar(); + var l = []; + l.push(bz.getYearShiShenZhi()[0]); + l.push(bz.getMonthShiShenZhi()[0]); + l.push(bz.getDayShiShenZhi()[0]); + l.push(bz.getTimeShiShenZhi()[0]); + return l; + }, + getBaZiShiShenYearZhi:function(){ + return this.getEightChar().getYearShiShenZhi(); + }, + getBaZiShiShenMonthZhi:function(){ + return this.getEightChar().getMonthShiShenZhi(); + }, + getBaZiShiShenDayZhi:function(){ + return this.getEightChar().getDayShiShenZhi(); + }, + getBaZiShiShenTimeZhi:function(){ + return this.getEightChar().getTimeShiShenZhi(); + }, + getZhiXing:function(){ + var offset = this._p.dayZhiIndex-this._p.monthZhiIndex; + if(offset<0){ + offset += 12; + } + return LunarUtil.ZHI_XING[offset+1]; + }, + getDayTianShen:function(){ + var monthZhi = this.getMonthZhi(); + var offset = LunarUtil.ZHI_TIAN_SHEN_OFFSET[monthZhi]; + return LunarUtil.TIAN_SHEN[(this._p.dayZhiIndex+offset)%12+1]; + }, + getTimeTianShen:function(){ + var dayZhi = this.getDayZhiExact(); + var offset = LunarUtil.ZHI_TIAN_SHEN_OFFSET[dayZhi]; + return LunarUtil.TIAN_SHEN[(this._p.timeZhiIndex+offset)%12+1]; + }, + getDayTianShenType:function(){ + return LunarUtil.TIAN_SHEN_TYPE[this.getDayTianShen()]; + }, + getTimeTianShenType:function(){ + return LunarUtil.TIAN_SHEN_TYPE[this.getTimeTianShen()]; + }, + getDayTianShenLuck:function(){ + return LunarUtil.TIAN_SHEN_TYPE_LUCK[this.getDayTianShenType()]; + }, + getTimeTianShenLuck:function(){ + return LunarUtil.TIAN_SHEN_TYPE_LUCK[this.getTimeTianShenType()]; + }, + getDayPositionTai:function(){ + return LunarUtil.POSITION_TAI_DAY[LunarUtil.getJiaZiIndex(this.getDayInGanZhi())]; + }, + getMonthPositionTai:function(){ + var m = this._p.month; + if(m<0){ + return ''; + } + return LunarUtil.POSITION_TAI_MONTH[m-1]; + }, + getDayYi:function(){ + return LunarUtil.getDayYi(this.getMonthInGanZhiExact(),this.getDayInGanZhi()); + }, + getDayJi:function(){ + return LunarUtil.getDayJi(this.getMonthInGanZhiExact(),this.getDayInGanZhi()); + }, + getDayJiShen:function(){ + return LunarUtil.getDayJiShen(this.getMonth(),this.getDayInGanZhi()); + }, + getDayXiongSha:function(){ + return LunarUtil.getDayXiongSha(this.getMonth(),this.getDayInGanZhi()); + }, + getTimeYi:function(){ + return LunarUtil.getTimeYi(this.getDayInGanZhiExact(),this.getTimeInGanZhi()); + }, + getTimeJi:function(){ + return LunarUtil.getTimeJi(this.getDayInGanZhiExact(),this.getTimeInGanZhi()); + }, + getYueXiang:function(){ + return LunarUtil.YUE_XIANG[this._p.day]; + }, + _getYearNineStar:function(yearInGanZhi){ + var index = LunarUtil.getJiaZiIndex(yearInGanZhi) + 1; + var yearOffset = 0; + if (index != LunarUtil.getJiaZiIndex(this.getYearInGanZhi()) + 1) { + yearOffset = -1; + } + var yuan = Math.floor((this._p.year + yearOffset + 2696) / 60) % 3; + var offset = (62 + yuan * 3 - index) % 9; + if(0 === offset){ + offset = 9; + } + return NineStar.fromIndex(offset - 1); + }, + getYearNineStar:function(sect){ + var yearInGanZhi; + switch (sect) { + case 1: + yearInGanZhi = this.getYearInGanZhi(); + break; + case 3: + yearInGanZhi = this.getYearInGanZhiExact(); + break; + default: + yearInGanZhi = this.getYearInGanZhiByLiChun(); + } + return this._getYearNineStar(yearInGanZhi); + }, + _getMonthNineStar:function(yearZhiIndex, monthZhiIndex){ + var index = yearZhiIndex % 3; + var n = 27 - (index * 3); + if (monthZhiIndex < LunarUtil.BASE_MONTH_ZHI_INDEX) { + n -= 3; + } + var offset = (n - monthZhiIndex) % 9; + return NineStar.fromIndex(offset); + }, + getMonthNineStar:function(sect){ + var yearZhiIndex; + var monthZhiIndex; + switch (sect) { + case 1: + yearZhiIndex = this._p.yearZhiIndex; + monthZhiIndex = this._p.monthZhiIndex; + break; + case 3: + yearZhiIndex = this._p.yearZhiIndexExact; + monthZhiIndex = this._p.monthZhiIndexExact; + break; + default: + yearZhiIndex = this._p.yearZhiIndexByLiChun; + monthZhiIndex = this._p.monthZhiIndex; + } + return this._getMonthNineStar(yearZhiIndex, monthZhiIndex); + }, + getDayNineStar:function(){ + var solarYmd = this._p.solar.toYmd(); + var dongZhi = this._p.jieQi['冬至']; + var dongZhi2 = this._p.jieQi['DONG_ZHI']; + var xiaZhi = this._p.jieQi['夏至']; + var dongZhiIndex = LunarUtil.getJiaZiIndex(dongZhi.getLunar().getDayInGanZhi()); + var dongZhiIndex2 = LunarUtil.getJiaZiIndex(dongZhi2.getLunar().getDayInGanZhi()); + var xiaZhiIndex = LunarUtil.getJiaZiIndex(xiaZhi.getLunar().getDayInGanZhi()); + var solarShunBai; + var solarShunBai2; + var solarNiZi; + if (dongZhiIndex>29) { + solarShunBai = dongZhi.next(60 - dongZhiIndex); + } else { + solarShunBai = dongZhi.next(-dongZhiIndex); + } + var solarShunBaiYmd = solarShunBai.toYmd(); + if (dongZhiIndex2>29) { + solarShunBai2 = dongZhi2.next(60 - dongZhiIndex2); + } else { + solarShunBai2 = dongZhi2.next(-dongZhiIndex2); + } + var solarShunBaiYmd2 = solarShunBai2.toYmd(); + if (xiaZhiIndex>29) { + solarNiZi = xiaZhi.next(60 - xiaZhiIndex); + } else { + solarNiZi = xiaZhi.next(-xiaZhiIndex); + } + var solarNiZiYmd = solarNiZi.toYmd(); + var offset = 0; + if (solarYmd >= solarShunBaiYmd && solarYmd < solarNiZiYmd) { + offset = ExactDate.getDaysBetween(solarShunBai.getCalendar(), this.getSolar().getCalendar()) % 9; + } else if (solarYmd >= solarNiZiYmd && solarYmd < solarShunBaiYmd2){ + offset = 8 - (ExactDate.getDaysBetween(solarNiZi.getCalendar(), this.getSolar().getCalendar()) % 9); + } else if (solarYmd >= solarShunBaiYmd2) { + offset = ExactDate.getDaysBetween(solarShunBai2.getCalendar(), this.getSolar().getCalendar()) % 9; + } else if (solarYmd < solarShunBaiYmd) { + offset = (8 + ExactDate.getDaysBetween(this.getSolar().getCalendar(), solarShunBai.getCalendar())) % 9; + } + return NineStar.fromIndex(offset); + }, + getTimeNineStar:function(){ + var solarYmd = this._p.solar.toYmd(); + var asc = false; + if((solarYmd >= this._p.jieQi['冬至'].toYmd() && solarYmd < this._p.jieQi['夏至'].toYmd()) || solarYmd >= this._p.jieQi['DONG_ZHI'].toYmd()){ + asc = true; + } + var start = asc ? 6 : 2; + var dayZhi = this.getDayZhi(); + if ('子午卯酉'.indexOf(dayZhi) > -1) { + start = asc ? 0 : 8; + } else if ('辰戌丑未'.indexOf(dayZhi) > -1) { + start = asc ? 3 : 5; + } + var index = asc ? start + this._p.timeZhiIndex : start + 9 - this._p.timeZhiIndex; + return NineStar.fromIndex(index % 9); + }, + getSolar:function(){ + return this._p.solar; + }, + getJieQiTable:function(){ + return this._p.jieQi; + }, + getJieQiList:function(){ + return this._p.jieQiList; + }, + getNextJie:function(wholeDay){ + var conditions = []; + for(var i=0,j=Lunar.JIE_QI_IN_USE.length/2;itoday){ + continue; + } + if(null == near || day > near[wholeDay ? 'toYmd' : 'toYmdHms']()) { + name = jq; + near = solar; + } + } + } + if(null==near){ + return null; + } + return this._buildJieQi(name, near); + }, + getCurrentJieQi:function(){ + for(var key in this._p.jieQi){ + var d = this._p.jieQi[key]; + if(d.getYear() === this._p.solar.getYear() && d.getMonth() === this._p.solar.getMonth() && d.getDay() === this._p.solar.getDay()){ + return this._buildJieQi(this._convertJieQi(key), d); + } + } + return null; + }, + getCurrentJie:function(){ + for(var i=0, j=Lunar.JIE_QI_IN_USE.length; i0){ + s += ' ['+jq+']'; + } + s += ' '+this.getGong()+'方'+this.getShou(); + s += ' 星宿['+this.getXiu()+this.getZheng()+this.getAnimal()+']('+this.getXiuLuck()+')'; + s += ' 彭祖百忌['+this.getPengZuGan()+' '+this.getPengZuZhi()+']'; + s += ' 喜神方位['+this.getDayPositionXi()+']('+this.getDayPositionXiDesc()+')'; + s += ' 阳贵神方位['+this.getDayPositionYangGui()+']('+this.getDayPositionYangGuiDesc()+')'; + s += ' 阴贵神方位['+this.getDayPositionYinGui()+']('+this.getDayPositionYinGuiDesc()+')'; + s += ' 福神方位['+this.getDayPositionFu()+']('+this.getDayPositionFuDesc()+')'; + s += ' 财神方位['+this.getDayPositionCai()+']('+this.getDayPositionCaiDesc()+')'; + s += ' 冲['+this.getDayChongDesc()+']'; + s += ' 煞['+this.getDaySha()+']'; + return s; + }, + _buildNameAndIndex: function(name, index){ + return { + _p:{ + name: name, + index: index + }, + getName: function(){return this._p.name;}, + setName: function(name){this._p.name = name;}, + getIndex: function(){return this._p.index;}, + setIndex: function(index){this._p.index = index;}, + toString: function(){return this.getName();}, + toFullString: function(){return this.getName()+'第'+this.getIndex()+'天';} + }; + }, + getShuJiu:function(){ + var currentCalendar = ExactDate.fromYmd(this._p.solar.getYear(),this._p.solar.getMonth(),this._p.solar.getDay()); + var start = this._p.jieQi['DONG_ZHI']; + var startCalendar = ExactDate.fromYmd(start.getYear(),start.getMonth(),start.getDay()); + if (currentCalendar < startCalendar) { + start = this._p.jieQi['冬至']; + startCalendar = ExactDate.fromYmd(start.getYear(),start.getMonth(),start.getDay()); + } + var endCalendar = ExactDate.fromYmd(start.getYear(),start.getMonth(),start.getDay()); + endCalendar.setDate(endCalendar.getDate() + 81); + if (currentCalendar < startCalendar || currentCalendar >= endCalendar) { + return null; + } + var days = ExactDate.getDaysBetween(startCalendar, currentCalendar); + return this._buildNameAndIndex(LunarUtil.NUMBER[Math.floor(days / 9) + 1] + '九', days % 9 + 1); + }, + getFu:function(){ + var currentCalendar = ExactDate.fromYmd(this._p.solar.getYear(),this._p.solar.getMonth(),this._p.solar.getDay()); + var xiaZhi = this._p.jieQi['夏至']; + var liQiu = this._p.jieQi['立秋']; + var startCalendar = ExactDate.fromYmd(xiaZhi.getYear(),xiaZhi.getMonth(),xiaZhi.getDay()); + + // 第1个庚日 + var add = 6 - xiaZhi.getLunar().getDayGanIndex(); + if (add < 0) { + add += 10; + } + // 第3个庚日,即初伏第1天 + add += 20; + startCalendar.setDate(startCalendar.getDate() + add); + + // 初伏以前 + if (currentCalendar < startCalendar) { + return null; + } + + var days = ExactDate.getDaysBetween(startCalendar, currentCalendar); + if (days < 10) { + return this._buildNameAndIndex('初伏', days + 1); + } + + // 第4个庚日,中伏第1天 + startCalendar.setDate(startCalendar.getDate() + 10); + + days = ExactDate.getDaysBetween(startCalendar, currentCalendar); + if (days < 10) { + return this._buildNameAndIndex('中伏', days + 1); + } + + // 第5个庚日,中伏第11天或末伏第1天 + startCalendar.setDate(startCalendar.getDate() + 10); + + var liQiuCalendar = ExactDate.fromYmd(liQiu.getYear(),liQiu.getMonth(),liQiu.getDay()); + + days = ExactDate.getDaysBetween(startCalendar, currentCalendar); + // 末伏 + if (liQiuCalendar <= startCalendar) { + if (days < 10) { + return this._buildNameAndIndex('末伏', days + 1); + } + } else { + // 中伏 + if (days < 10) { + return this._buildNameAndIndex('中伏', days + 11); + } + // 末伏第1天 + startCalendar.setDate(startCalendar.getDate() + 10); + days = ExactDate.getDaysBetween(startCalendar, currentCalendar); + if (days < 10) { + return this._buildNameAndIndex('末伏', days + 1); + } + } + return null; + }, + getLiuYao:function(){ + return LunarUtil.LIU_YAO[(Math.abs(this._p.month)+this._p.day-2)%6]; + }, + getWuHou:function(){ + var jieQi = this.getPrevJieQi(true); + var name = jieQi.getName(); + var offset = 0; + for(var i=0,j=Lunar.JIE_QI.length;i max) { + offset = max; + } + return name + ' ' + LunarUtil.HOU[offset]; + }, + getDayLu:function(){ + var gan = LunarUtil.LU[this.getDayGan()]; + var zhi = LunarUtil.LU[this.getDayZhi()]; + var lu = gan + '命互禄'; + if (zhi) { + lu += ' ' + zhi + '命进禄'; + } + return lu; + }, + getTimes:function(){ + var l = []; + l.push(LunarTime.fromYmdHms(this._p.year, this._p.month, this._p.day, 0, 0, 0)); + for(var i = 0; i < 12; i++){ + l.push(LunarTime.fromYmdHms(this._p.year, this._p.month, this._p.day, (i+1)*2-1, 0, 0)); + } + return l; + }, + getFoto:function(){return Foto.fromLunar(this);}, + getTao:function(){return Tao.fromLunar(this);} + }; + }; + return { + JIE_QI: ['冬至','小寒','大寒','立春','雨水','惊蛰','春分','清明','谷雨','立夏','小满','芒种','夏至','小暑','大暑','立秋','处暑','白露','秋分','寒露','霜降','立冬','小雪','大雪'], + JIE_QI_IN_USE: ['DA_XUE', '冬至', '小寒', '大寒', '立春', '雨水', '惊蛰', '春分', '清明', '谷雨', '立夏', '小满', '芒种', '夏至', '小暑', '大暑', '立秋', '处暑', '白露', '秋分', '寒露', '霜降', '立冬', '小雪', '大雪', 'DONG_ZHI', 'XIAO_HAN', 'DA_HAN', 'LI_CHUN', 'YU_SHUI', 'JING_ZHE'], + fromYmdHms:function(y,m,d,hour,minute,second){return _fromYmdHms(y,m,d,hour,minute,second);}, + fromYmd:function(y,m,d){return _fromYmdHms(y,m,d,0,0,0);}, + fromDate:function(date){return _fromDate(date);} + }; + })(); + var SolarWeek = (function(){ + var _fromDate = function(date,start){ + return _fromYmd(date.getFullYear(),date.getMonth()+1,date.getDate(),start); + }; + var _fromYmd = function(y,m,d,start){ + return { + _p:{ + year:y, + month:m, + day:d, + start:start, + calendar:ExactDate.fromYmd(y,m,d) + }, + getYear:function(){ + return this._p.year; + }, + getMonth:function(){ + return this._p.month; + }, + getDay:function(){ + return this._p.day; + }, + getStart:function(){ + return this._p.start; + }, + /** + * 获取当前日期是在当月第几周 + * @return number 周序号,从1开始 + */ + getIndex:function(){ + var firstDate = ExactDate.fromYmd(this._p.year,this._p.month,1); + var firstDayWeek = firstDate.getDay(); + var offset = firstDayWeek - this._p.start; + if(offset < 0) { + offset += 7; + } + return Math.ceil((this._p.day + offset)/7); + }, + /** + * 周推移 + * @param weeks 推移的周数,负数为倒推 + * @param separateMonth 是否按月单独计算 + * @return object 推移后的阳历周 + */ + next:function(weeks,separateMonth){ + if(0===weeks){ + return _fromYmd(this._p.year,this._p.month,this._p.day,this._p.start); + } + var date; + if(separateMonth){ + var n = weeks; + date = ExactDate.fromYmd(this._p.year,this._p.month,this._p.day); + var week = _fromDate(date,this._p.start); + var month = this._p.month; + var plus = n>0; + while(0!==n){ + date.setDate(date.getDate()+(plus?7:-7)); + week = _fromDate(date,this._p.start); + var weekMonth = week.getMonth(); + if(month!==weekMonth){ + var index = week.getIndex(); + if(plus){ + if(1===index){ + var firstDay = week.getFirstDay(); + week = _fromYmd(firstDay.getYear(),firstDay.getMonth(),firstDay.getDay(),this._p.start); + weekMonth = week.getMonth(); + }else{ + date = ExactDate.fromYmd(week.getYear(),week.getMonth(),1); + week = _fromDate(date,this._p.start); + } + }else{ + var size = SolarUtil.getWeeksOfMonth(week.getYear(),week.getMonth(),this._p.start); + if(size===index){ + var lastDay = week.getFirstDay().next(6); + week = _fromYmd(lastDay.getYear(),lastDay.getMonth(),lastDay.getDay(),this._p.start); + weekMonth = week.getMonth(); + }else{ + date = ExactDate.fromYmd(week.getYear(),week.getMonth(),SolarUtil.getDaysOfMonth(week.getYear(),week.getMonth())); + week = _fromDate(date,this._p.start); + } + } + month = weekMonth; + } + n-=plus?1:-1; + } + return week; + }else{ + date = ExactDate.fromYmd(this._p.year,this._p.month,this._p.day); + date.setDate(date.getDate()+weeks*7); + return _fromDate(date,this._p.start); + } + }, + /** + * 获取本周第一天的阳历日期(可能跨月) + * @return object 本周第一天的阳历日期 + */ + getFirstDay:function(){ + var date = ExactDate.fromYmd(this._p.year,this._p.month,this._p.day); + var prev = date.getDay()-this._p.start; + if(prev<0){ + prev += 7; + } + date.setDate(date.getDate()-prev); + return Solar.fromDate(date); + }, + /** + * 获取本周第一天的阳历日期(仅限当月) + * @return object 本周第一天的阳历日期 + */ + getFirstDayInMonth:function(){ + var index = 0; + var days = this.getDays(); + for(var i = 0;i 0 && i < 26) { + jq[i - 1] = Math.round(t); + } + } + + // 冬至前的初一 + var w = ShouXingUtil.calcShuo(jq[0]); + if (w > jq[0]) { + w -= 29.5306; + } + // 递推每月初一 + for (i = 0; i < 16; i++) { + hs.push(ShouXingUtil.calcShuo(w + 29.5306 * i)); + } + // 每月天数 + for (i = 0; i < 15; i++) { + dayCounts.push(Math.floor(hs[i + 1] - hs[i])); + } + + var currentYearLeap = _LEAP['_' + currentYear]; + if (!currentYearLeap) { + currentYearLeap = -1; + if (hs[13] <= jq[24]) { + i = 1; + while (hs[i + 1] > jq[2 * i] && i < 13) { + i++; + } + currentYearLeap = i; + } + } + + var prevYear = currentYear - 1; + var prevYearLeap = _LEAP['_' + prevYear]; + prevYearLeap = prevYearLeap ? prevYearLeap - 12 : -1; + + var y = this._p.year - 1; + var m = 11; + for (i = 0, j = dayCounts.length; i < j; i++) { + var cm = m; + var isNextLeap = false; + if (y === currentYear && i === currentYearLeap) { + cm = -cm; + } else if (y === prevYear && i === prevYearLeap) { + cm = -cm; + } + if (y === currentYear && i + 1 === currentYearLeap) { + isNextLeap = true; + } else if (y === prevYear && i + 1 === prevYearLeap) { + isNextLeap = true; + } + this._p.months.push(LunarMonth._(y, cm, dayCounts[i], hs[i] + Solar.J2000)); + if (!isNextLeap) { + m++; + } + if (m === 13) { + m = 1; + y++; + } + } + return this; + } + }._compute(); + }; + var _fromCachedYear = function(lunarYear) { + var key = '_' + lunarYear; + var obj = _CACHE[key]; + if (!obj) { + obj = _fromYear(lunarYear); + _CACHE[key] = obj; + } + return obj; + }; + return { + fromYear:function(lunarYear){return _fromCachedYear(lunarYear);} + }; + })(); + var LunarMonth = (function(){ + var _fromYm = function(lunarYear,lunarMonth){ + return LunarYear.fromYear(lunarYear).getMonth(lunarMonth); + }; + var _new = function(lunarYear, lunarMonth, dayCount, firstJulianDay){ + return { + _p: { + year: lunarYear, + month: lunarMonth, + dayCount: dayCount, + firstJulianDay: firstJulianDay + }, + getYear:function(){return this._p.year;}, + getMonth:function(){return this._p.month;}, + getDayCount:function(){return this._p.dayCount;}, + getFirstJulianDay:function(){return this._p.firstJulianDay;}, + isLeap:function(){return this._p.month<0;}, + getPositionTaiSui:function(){ + var p = ''; + var m = Math.abs(this._p.month); + switch(m) { + case 1: + case 5: + case 9: + p = '艮'; + break; + case 3: + case 7: + case 11: + p = '坤'; + break; + case 4: + case 8: + case 12: + p = '巽'; + break; + default: + p = LunarUtil.POSITION_GAN[Solar.fromJulianDay(this.getFirstJulianDay()).getLunar().getMonthGanIndex()]; + } + return p; + }, + getPositionTaiSuiDesc:function(){ + return LunarUtil.POSITION_DESC[this.getPositionTaiSui()]; + }, + getNineStar:function(){ + var index = LunarYear.fromYear(this._p.year).getZhiIndex() % 3; + var m = this._p.month; + if (m < 0) { + m = -m; + } + var monthZhiIndex = (13 + m) % 12; + var n = 27 - (index * 3); + if (monthZhiIndex < LunarUtil.BASE_MONTH_ZHI_INDEX) { + n -= 3; + } + var offset = (n - monthZhiIndex) % 9; + return NineStar.fromIndex(offset); + }, + next:function(n){ + if (0 == n) { + return LunarMonth.fromYm(this._p.year, this._p.month); + } else { + var rest = Math.abs(n); + var ny = this._p.year; + var iy = ny; + var im = this._p.month; + var index = 0; + var months = LunarYear.fromYear(ny).getMonths(); + var i; + var m; + var size; + if (n > 0) { + while (true) { + size = months.length; + for (i = 0; i < size; i++) { + m = months[i]; + if (m.getYear() === iy && m.getMonth() === im) { + index = i; + break; + } + } + var more = size - index - 1; + if (rest < more) { + break; + } + rest -= more; + var lastMonth = months[size - 1]; + iy = lastMonth.getYear(); + im = lastMonth.getMonth(); + ny++; + months = LunarYear.fromYear(ny).getMonths(); + } + return months[index + rest]; + } else { + while (true) { + size = months.length; + for (i = 0; i < size; i++) { + m = months[i]; + if (m.getYear() === iy && m.getMonth() === im) { + index = i; + break; + } + } + if (rest <= index) { + break; + } + rest -= index; + var firstMonth = months[0]; + iy = firstMonth.getYear(); + im = firstMonth.getMonth(); + ny--; + months = LunarYear.fromYear(ny).getMonths(); + } + return months[index - rest]; + } + } + }, + toString:function(){return this.getYear()+'年'+(this.isLeap()?'闰':'')+LunarUtil.MONTH[Math.abs(this.getMonth())]+'月('+this.getDayCount()+')天';} + }; + }; + return { + fromYm:function(lunarYear,lunarMonth){return _fromYm(lunarYear,lunarMonth);}, + _:function(lunarYear, lunarMonth, dayCount, firstJulianDay){return _new(lunarYear, lunarMonth, dayCount, firstJulianDay);} + }; + })(); + var ShouXingUtil = (function(){ + return { + PI_2: 2*Math.PI, + ONE_THIRD: 1.0/3, + SECOND_PER_DAY: 86400, + SECOND_PER_RAD: 648000 / Math.PI, + NUT_B:[2.1824, -33.75705, 36e-6, -1720, 920, 3.5069, 1256.66393, 11e-6, -132, 57, 1.3375, 16799.4182, -51e-6, -23, 10, 4.3649, -67.5141, 72e-6, 21, -9, 0.04, -628.302, 0, -14, 0, 2.36, 8328.691, 0, 7, 0, 3.46, 1884.966, 0, -5, 2, 5.44, 16833.175, 0, -4, 2, 3.69, 25128.110, 0, -3, 0, 3.55, 628.362, 0, 2, 0], + DT_AT:[-4000, 108371.7, -13036.80, 392.000, 0.0000, -500, 17201.0, -627.82, 16.170, -0.3413, -150, 12200.6, -346.41, 5.403, -0.1593, 150, 9113.8, -328.13, -1.647, 0.0377, 500, 5707.5, -391.41, 0.915, 0.3145, 900, 2203.4, -283.45, 13.034, -0.1778, 1300, 490.1, -57.35, 2.085, -0.0072, 1600, 120.0, -9.81, -1.532, 0.1403, 1700, 10.2, -0.91, 0.510, -0.0370, 1800, 13.4, -0.72, 0.202, -0.0193, 1830, 7.8, -1.81, 0.416, -0.0247, 1860, 8.3, -0.13, -0.406, 0.0292, 1880, -5.4, 0.32, -0.183, 0.0173, 1900, -2.3, 2.06, 0.169, -0.0135, 1920, 21.2, 1.69, -0.304, 0.0167, 1940, 24.2, 1.22, -0.064, 0.0031, 1960, 33.2, 0.51, 0.231, -0.0109, 1980, 51.0, 1.29, -0.026, 0.0032, 2000, 63.87, 0.1, 0, 0, 2005, 64.7, 0.4, 0, 0, 2015, 69], + XL0:[10000000000, 20, 578, 920, 1100, 1124, 1136, 1148, 1217, 1226, 1229, 1229, 1229, 1229, 1937, 2363, 2618, 2633, 2660, 2666, 17534704567, 0.00000000000, 0.00000000000, 334165646, 4.669256804, 6283.075849991, 3489428, 4.6261024, 12566.1517000, 349706, 2.744118, 5753.384885, 341757, 2.828866, 3.523118, 313590, 3.627670, 77713.771468, 267622, 4.418084, 7860.419392, 234269, 6.135162, 3930.209696, 132429, 0.742464, 11506.769770, 127317, 2.037097, 529.690965, 119917, 1.109629, 1577.343542, 99025, 5.23268, 5884.92685, 90186, 2.04505, 26.29832, 85722, 3.50849, 398.14900, 77979, 1.17883, 5223.69392, 75314, 2.53339, 5507.55324, 50526, 4.58293, 18849.22755, 49238, 4.20507, 775.52261, 35666, 2.91954, 0.06731, 31709, 5.84902, 11790.62909, 28413, 1.89869, 796.29801, 27104, 0.31489, 10977.07880, 24281, 0.34481, 5486.77784, 20616, 4.80647, 2544.31442, 20539, 1.86948, 5573.14280, 20226, 2.45768, 6069.77675, 15552, 0.83306, 213.29910, 13221, 3.41118, 2942.46342, 12618, 1.08303, 20.77540, 11513, 0.64545, 0.98032, 10285, 0.63600, 4694.00295, 10190, 0.97569, 15720.83878, 10172, 4.26680, 7.11355, 9921, 6.2099, 2146.1654, 9761, 0.6810, 155.4204, 8580, 5.9832, 161000.6857, 8513, 1.2987, 6275.9623, 8471, 3.6708, 71430.6956, 7964, 1.8079, 17260.1547, 7876, 3.0370, 12036.4607, 7465, 1.7551, 5088.6288, 7387, 3.5032, 3154.6871, 7355, 4.6793, 801.8209, 6963, 0.8330, 9437.7629, 6245, 3.9776, 8827.3903, 6115, 1.8184, 7084.8968, 5696, 2.7843, 6286.5990, 5612, 4.3869, 14143.4952, 5558, 3.4701, 6279.5527, 5199, 0.1891, 12139.5535, 5161, 1.3328, 1748.0164, 5115, 0.2831, 5856.4777, 4900, 0.4874, 1194.4470, 4104, 5.3682, 8429.2413, 4094, 2.3985, 19651.0485, 3920, 6.1683, 10447.3878, 3677, 6.0413, 10213.2855, 3660, 2.5696, 1059.3819, 3595, 1.7088, 2352.8662, 3557, 1.7760, 6812.7668, 3329, 0.5931, 17789.8456, 3041, 0.4429, 83996.8473, 3005, 2.7398, 1349.8674, 2535, 3.1647, 4690.4798, 2474, 0.2148, 3.5904, 2366, 0.4847, 8031.0923, 2357, 2.0653, 3340.6124, 2282, 5.2220, 4705.7323, 2189, 5.5559, 553.5694, 2142, 1.4256, 16730.4637, 2109, 4.1483, 951.7184, 2030, 0.3713, 283.8593, 1992, 5.2221, 12168.0027, 1986, 5.7747, 6309.3742, 1912, 3.8222, 23581.2582, 1889, 5.3863, 149854.4001, 1790, 2.2149, 13367.9726, 1748, 4.5605, 135.0651, 1622, 5.9884, 11769.8537, 1508, 4.1957, 6256.7775, 1442, 4.1932, 242.7286, 1435, 3.7236, 38.0277, 1397, 4.4014, 6681.2249, 1362, 1.8893, 7632.9433, 1250, 1.1305, 5.5229, 1205, 2.6223, 955.5997, 1200, 1.0035, 632.7837, 1129, 0.1774, 4164.3120, 1083, 0.3273, 103.0928, 1052, 0.9387, 11926.2544, 1050, 5.3591, 1592.5960, 1033, 6.1998, 6438.4962, 1001, 6.0291, 5746.2713, 980, 0.999, 11371.705, 980, 5.244, 27511.468, 938, 2.624, 5760.498, 923, 0.483, 522.577, 922, 4.571, 4292.331, 905, 5.337, 6386.169, 862, 4.165, 7058.598, 841, 3.299, 7234.794, 836, 4.539, 25132.303, 813, 6.112, 4732.031, 812, 6.271, 426.598, 801, 5.821, 28.449, 787, 0.996, 5643.179, 776, 2.957, 23013.540, 769, 3.121, 7238.676, 758, 3.974, 11499.656, 735, 4.386, 316.392, 731, 0.607, 11513.883, 719, 3.998, 74.782, 706, 0.323, 263.084, 676, 5.911, 90955.552, 663, 3.665, 17298.182, 653, 5.791, 18073.705, 630, 4.717, 6836.645, 615, 1.458, 233141.314, 612, 1.075, 19804.827, 596, 3.321, 6283.009, 596, 2.876, 6283.143, 555, 2.452, 12352.853, 541, 5.392, 419.485, 531, 0.382, 31441.678, 519, 4.065, 6208.294, 513, 2.361, 10973.556, 494, 5.737, 9917.697, 450, 3.272, 11015.106, 449, 3.653, 206.186, 447, 2.064, 7079.374, 435, 4.423, 5216.580, 421, 1.906, 245.832, 413, 0.921, 3738.761, 402, 0.840, 20.355, 387, 1.826, 11856.219, 379, 2.344, 3.881, 374, 2.954, 3128.389, 370, 5.031, 536.805, 365, 1.018, 16200.773, 365, 1.083, 88860.057, 352, 5.978, 3894.182, 352, 2.056, 244287.600, 351, 3.713, 6290.189, 340, 1.106, 14712.317, 339, 0.978, 8635.942, 339, 3.202, 5120.601, 333, 0.837, 6496.375, 325, 3.479, 6133.513, 316, 5.089, 21228.392, 316, 1.328, 10873.986, 309, 3.646, 10.637, 303, 1.802, 35371.887, 296, 3.397, 9225.539, 288, 6.026, 154717.610, 281, 2.585, 14314.168, 262, 3.856, 266.607, 262, 2.579, 22483.849, 257, 1.561, 23543.231, 255, 3.949, 1990.745, 251, 3.744, 10575.407, 240, 1.161, 10984.192, 238, 0.106, 7.046, 236, 4.272, 6040.347, 234, 3.577, 10969.965, 211, 3.714, 65147.620, 210, 0.754, 13521.751, 207, 4.228, 5650.292, 202, 0.814, 170.673, 201, 4.629, 6037.244, 200, 0.381, 6172.870, 199, 3.933, 6206.810, 199, 5.197, 6262.300, 197, 1.046, 18209.330, 195, 1.070, 5230.807, 195, 4.869, 36.028, 194, 4.313, 6244.943, 192, 1.229, 709.933, 192, 5.595, 6282.096, 192, 0.602, 6284.056, 189, 3.744, 23.878, 188, 1.904, 15.252, 188, 0.867, 22003.915, 182, 3.681, 15110.466, 181, 0.491, 1.484, 179, 3.222, 39302.097, 179, 1.259, 12559.038, 62833196674749, 0.000000000000, 0.000000000000, 20605886, 2.67823456, 6283.07584999, 430343, 2.635127, 12566.151700, 42526, 1.59047, 3.52312, 11926, 5.79557, 26.29832, 10898, 2.96618, 1577.34354, 9348, 2.5921, 18849.2275, 7212, 1.1385, 529.6910, 6777, 1.8747, 398.1490, 6733, 4.4092, 5507.5532, 5903, 2.8880, 5223.6939, 5598, 2.1747, 155.4204, 4541, 0.3980, 796.2980, 3637, 0.4662, 775.5226, 2896, 2.6471, 7.1135, 2084, 5.3414, 0.9803, 1910, 1.8463, 5486.7778, 1851, 4.9686, 213.2991, 1729, 2.9912, 6275.9623, 1623, 0.0322, 2544.3144, 1583, 1.4305, 2146.1654, 1462, 1.2053, 10977.0788, 1246, 2.8343, 1748.0164, 1188, 3.2580, 5088.6288, 1181, 5.2738, 1194.4470, 1151, 2.0750, 4694.0030, 1064, 0.7661, 553.5694, 997, 1.303, 6286.599, 972, 4.239, 1349.867, 945, 2.700, 242.729, 858, 5.645, 951.718, 758, 5.301, 2352.866, 639, 2.650, 9437.763, 610, 4.666, 4690.480, 583, 1.766, 1059.382, 531, 0.909, 3154.687, 522, 5.661, 71430.696, 520, 1.854, 801.821, 504, 1.425, 6438.496, 433, 0.241, 6812.767, 426, 0.774, 10447.388, 413, 5.240, 7084.897, 374, 2.001, 8031.092, 356, 2.429, 14143.495, 350, 4.800, 6279.553, 337, 0.888, 12036.461, 337, 3.862, 1592.596, 325, 3.400, 7632.943, 322, 0.616, 8429.241, 318, 3.188, 4705.732, 297, 6.070, 4292.331, 295, 1.431, 5746.271, 290, 2.325, 20.355, 275, 0.935, 5760.498, 270, 4.804, 7234.794, 253, 6.223, 6836.645, 228, 5.003, 17789.846, 225, 5.672, 11499.656, 215, 5.202, 11513.883, 208, 3.955, 10213.286, 208, 2.268, 522.577, 206, 2.224, 5856.478, 206, 2.550, 25132.303, 203, 0.910, 6256.778, 189, 0.532, 3340.612, 188, 4.735, 83996.847, 179, 1.474, 4164.312, 178, 3.025, 5.523, 177, 3.026, 5753.385, 159, 4.637, 3.286, 157, 6.124, 5216.580, 155, 3.077, 6681.225, 154, 4.200, 13367.973, 143, 1.191, 3894.182, 138, 3.093, 135.065, 136, 4.245, 426.598, 134, 5.765, 6040.347, 128, 3.085, 5643.179, 127, 2.092, 6290.189, 125, 3.077, 11926.254, 125, 3.445, 536.805, 114, 3.244, 12168.003, 112, 2.318, 16730.464, 111, 3.901, 11506.770, 111, 5.320, 23.878, 105, 3.750, 7860.419, 103, 2.447, 1990.745, 96, 0.82, 3.88, 96, 4.08, 6127.66, 91, 5.42, 206.19, 91, 0.42, 7079.37, 88, 5.17, 11790.63, 81, 0.34, 9917.70, 80, 3.89, 10973.56, 78, 2.40, 1589.07, 78, 2.58, 11371.70, 77, 3.98, 955.60, 77, 3.36, 36.03, 76, 1.30, 103.09, 75, 5.18, 10969.97, 75, 4.96, 6496.37, 73, 5.21, 38.03, 72, 2.65, 6309.37, 70, 5.61, 3738.76, 69, 2.60, 3496.03, 69, 0.39, 15.25, 69, 2.78, 20.78, 65, 1.13, 7058.60, 64, 4.28, 28.45, 61, 5.63, 10984.19, 60, 0.73, 419.48, 60, 5.28, 10575.41, 58, 5.55, 17298.18, 58, 3.19, 4732.03, 5291887, 0.0000000, 0.0000000, 871984, 1.072097, 6283.075850, 30913, 0.86729, 12566.15170, 2734, 0.0530, 3.5231, 1633, 5.1883, 26.2983, 1575, 3.6846, 155.4204, 954, 0.757, 18849.228, 894, 2.057, 77713.771, 695, 0.827, 775.523, 506, 4.663, 1577.344, 406, 1.031, 7.114, 381, 3.441, 5573.143, 346, 5.141, 796.298, 317, 6.053, 5507.553, 302, 1.192, 242.729, 289, 6.117, 529.691, 271, 0.306, 398.149, 254, 2.280, 553.569, 237, 4.381, 5223.694, 208, 3.754, 0.980, 168, 0.902, 951.718, 153, 5.759, 1349.867, 145, 4.364, 1748.016, 134, 3.721, 1194.447, 125, 2.948, 6438.496, 122, 2.973, 2146.165, 110, 1.271, 161000.686, 104, 0.604, 3154.687, 100, 5.986, 6286.599, 92, 4.80, 5088.63, 89, 5.23, 7084.90, 83, 3.31, 213.30, 76, 3.42, 5486.78, 71, 6.19, 4690.48, 68, 3.43, 4694.00, 65, 1.60, 2544.31, 64, 1.98, 801.82, 61, 2.48, 10977.08, 50, 1.44, 6836.65, 49, 2.34, 1592.60, 46, 1.31, 4292.33, 46, 3.81, 149854.40, 43, 0.04, 7234.79, 40, 4.94, 7632.94, 39, 1.57, 71430.70, 38, 3.17, 6309.37, 35, 0.99, 6040.35, 35, 0.67, 1059.38, 31, 3.18, 2352.87, 31, 3.55, 8031.09, 30, 1.92, 10447.39, 30, 2.52, 6127.66, 28, 4.42, 9437.76, 28, 2.71, 3894.18, 27, 0.67, 25132.30, 26, 5.27, 6812.77, 25, 0.55, 6279.55, 23, 1.38, 4705.73, 22, 0.64, 6256.78, 20, 6.07, 640.88, 28923, 5.84384, 6283.07585, 3496, 0.0000, 0.0000, 1682, 5.4877, 12566.1517, 296, 5.196, 155.420, 129, 4.722, 3.523, 71, 5.30, 18849.23, 64, 5.97, 242.73, 40, 3.79, 553.57, 11408, 3.14159, 0.00000, 772, 4.134, 6283.076, 77, 3.84, 12566.15, 42, 0.42, 155.42, 88, 3.14, 0.00, 17, 2.77, 6283.08, 5, 2.01, 155.42, 3, 2.21, 12566.15, 27962, 3.19870, 84334.66158, 10164, 5.42249, 5507.55324, 8045, 3.8801, 5223.6939, 4381, 3.7044, 2352.8662, 3193, 4.0003, 1577.3435, 2272, 3.9847, 1047.7473, 1814, 4.9837, 6283.0758, 1639, 3.5646, 5856.4777, 1444, 3.7028, 9437.7629, 1430, 3.4112, 10213.2855, 1125, 4.8282, 14143.4952, 1090, 2.0857, 6812.7668, 1037, 4.0566, 71092.8814, 971, 3.473, 4694.003, 915, 1.142, 6620.890, 878, 4.440, 5753.385, 837, 4.993, 7084.897, 770, 5.554, 167621.576, 719, 3.602, 529.691, 692, 4.326, 6275.962, 558, 4.410, 7860.419, 529, 2.484, 4705.732, 521, 6.250, 18073.705, 903, 3.897, 5507.553, 618, 1.730, 5223.694, 380, 5.244, 2352.866, 166, 1.627, 84334.662, 10001398880, 0.00000000000, 0.00000000000, 167069963, 3.098463508, 6283.075849991, 1395602, 3.0552461, 12566.1517000, 308372, 5.198467, 77713.771468, 162846, 1.173877, 5753.384885, 157557, 2.846852, 7860.419392, 92480, 5.45292, 11506.76977, 54244, 4.56409, 3930.20970, 47211, 3.66100, 5884.92685, 34598, 0.96369, 5507.55324, 32878, 5.89984, 5223.69392, 30678, 0.29867, 5573.14280, 24319, 4.27350, 11790.62909, 21183, 5.84715, 1577.34354, 18575, 5.02194, 10977.07880, 17484, 3.01194, 18849.22755, 10984, 5.05511, 5486.77784, 9832, 0.8868, 6069.7768, 8650, 5.6896, 15720.8388, 8583, 1.2708, 161000.6857, 6490, 0.2725, 17260.1547, 6292, 0.9218, 529.6910, 5706, 2.0137, 83996.8473, 5574, 5.2416, 71430.6956, 4938, 3.2450, 2544.3144, 4696, 2.5781, 775.5226, 4466, 5.5372, 9437.7629, 4252, 6.0111, 6275.9623, 3897, 5.3607, 4694.0030, 3825, 2.3926, 8827.3903, 3749, 0.8295, 19651.0485, 3696, 4.9011, 12139.5535, 3566, 1.6747, 12036.4607, 3454, 1.8427, 2942.4634, 3319, 0.2437, 7084.8968, 3192, 0.1837, 5088.6288, 3185, 1.7778, 398.1490, 2846, 1.2134, 6286.5990, 2779, 1.8993, 6279.5527, 2628, 4.5890, 10447.3878, 2460, 3.7866, 8429.2413, 2393, 4.9960, 5856.4777, 2359, 0.2687, 796.2980, 2329, 2.8078, 14143.4952, 2210, 1.9500, 3154.6871, 2035, 4.6527, 2146.1654, 1951, 5.3823, 2352.8662, 1883, 0.6731, 149854.4001, 1833, 2.2535, 23581.2582, 1796, 0.1987, 6812.7668, 1731, 6.1520, 16730.4637, 1717, 4.4332, 10213.2855, 1619, 5.2316, 17789.8456, 1381, 5.1896, 8031.0923, 1364, 3.6852, 4705.7323, 1314, 0.6529, 13367.9726, 1041, 4.3329, 11769.8537, 1017, 1.5939, 4690.4798, 998, 4.201, 6309.374, 966, 3.676, 27511.468, 874, 6.064, 1748.016, 779, 3.674, 12168.003, 771, 0.312, 7632.943, 756, 2.626, 6256.778, 746, 5.648, 11926.254, 693, 2.924, 6681.225, 680, 1.423, 23013.540, 674, 0.563, 3340.612, 663, 5.661, 11371.705, 659, 3.136, 801.821, 648, 2.650, 19804.827, 615, 3.029, 233141.314, 612, 5.134, 1194.447, 563, 4.341, 90955.552, 552, 2.091, 17298.182, 534, 5.100, 31441.678, 531, 2.407, 11499.656, 523, 4.624, 6438.496, 513, 5.324, 11513.883, 477, 0.256, 11856.219, 461, 1.722, 7234.794, 458, 3.766, 6386.169, 458, 4.466, 5746.271, 423, 1.055, 5760.498, 422, 1.557, 7238.676, 415, 2.599, 7058.598, 401, 3.030, 1059.382, 397, 1.201, 1349.867, 379, 4.907, 4164.312, 360, 5.707, 5643.179, 352, 3.626, 244287.600, 348, 0.761, 10973.556, 342, 3.001, 4292.331, 336, 4.546, 4732.031, 334, 3.138, 6836.645, 324, 4.164, 9917.697, 316, 1.691, 11015.106, 307, 0.238, 35371.887, 298, 1.306, 6283.143, 298, 1.750, 6283.009, 293, 5.738, 16200.773, 286, 5.928, 14712.317, 281, 3.515, 21228.392, 280, 5.663, 8635.942, 277, 0.513, 26.298, 268, 4.207, 18073.705, 266, 0.900, 12352.853, 260, 2.962, 25132.303, 255, 2.477, 6208.294, 242, 2.800, 709.933, 231, 1.054, 22483.849, 229, 1.070, 14314.168, 216, 1.314, 154717.610, 215, 6.038, 10873.986, 200, 0.561, 7079.374, 198, 2.614, 951.718, 197, 4.369, 167283.762, 186, 2.861, 5216.580, 183, 1.660, 39302.097, 183, 5.912, 3738.761, 175, 2.145, 6290.189, 173, 2.168, 10575.407, 171, 3.702, 1592.596, 171, 1.343, 3128.389, 164, 5.550, 6496.375, 164, 5.856, 10984.192, 161, 1.998, 10969.965, 161, 1.909, 6133.513, 157, 4.955, 25158.602, 154, 6.216, 23543.231, 153, 5.357, 13521.751, 150, 5.770, 18209.330, 150, 5.439, 155.420, 139, 1.778, 9225.539, 139, 1.626, 5120.601, 128, 2.460, 13916.019, 123, 0.717, 143571.324, 122, 2.654, 88860.057, 121, 4.414, 3894.182, 121, 1.192, 3.523, 120, 4.030, 553.569, 119, 1.513, 17654.781, 117, 3.117, 14945.316, 113, 2.698, 6040.347, 110, 3.085, 43232.307, 109, 0.998, 955.600, 108, 2.939, 17256.632, 107, 5.285, 65147.620, 103, 0.139, 11712.955, 103, 5.850, 213.299, 102, 3.046, 6037.244, 101, 2.842, 8662.240, 100, 3.626, 6262.300, 98, 2.36, 6206.81, 98, 5.11, 6172.87, 98, 2.00, 15110.47, 97, 2.67, 5650.29, 97, 2.75, 6244.94, 96, 4.02, 6282.10, 96, 5.31, 6284.06, 92, 0.10, 29088.81, 85, 3.26, 20426.57, 84, 2.60, 28766.92, 81, 3.58, 10177.26, 80, 5.81, 5230.81, 78, 2.53, 16496.36, 77, 4.06, 6127.66, 73, 0.04, 5481.25, 72, 5.96, 12559.04, 72, 5.92, 4136.91, 71, 5.49, 22003.91, 70, 3.41, 7.11, 69, 0.62, 11403.68, 69, 3.90, 1589.07, 69, 1.96, 12416.59, 69, 4.51, 426.60, 67, 1.61, 11087.29, 66, 4.50, 47162.52, 66, 5.08, 283.86, 66, 4.32, 16858.48, 65, 1.04, 6062.66, 64, 1.59, 18319.54, 63, 5.70, 45892.73, 63, 4.60, 66567.49, 63, 3.82, 13517.87, 62, 2.62, 11190.38, 61, 1.54, 33019.02, 60, 5.58, 10344.30, 60, 5.38, 316428.23, 60, 5.78, 632.78, 59, 6.12, 9623.69, 57, 0.16, 17267.27, 57, 3.86, 6076.89, 57, 1.98, 7668.64, 56, 4.78, 20199.09, 55, 4.56, 18875.53, 55, 3.51, 17253.04, 54, 3.07, 226858.24, 54, 4.83, 18422.63, 53, 5.02, 12132.44, 52, 3.63, 5333.90, 52, 0.97, 155427.54, 51, 3.36, 20597.24, 50, 0.99, 11609.86, 50, 2.21, 1990.75, 48, 1.62, 12146.67, 48, 1.17, 12569.67, 47, 4.62, 5436.99, 47, 1.81, 12562.63, 47, 0.59, 21954.16, 47, 0.76, 7342.46, 46, 0.27, 4590.91, 46, 3.77, 156137.48, 45, 5.66, 10454.50, 44, 5.84, 3496.03, 43, 0.24, 17996.03, 41, 5.93, 51092.73, 41, 4.21, 12592.45, 40, 5.14, 1551.05, 40, 5.28, 15671.08, 39, 3.69, 18052.93, 39, 4.94, 24356.78, 38, 2.72, 11933.37, 38, 5.23, 7477.52, 38, 4.99, 9779.11, 37, 3.70, 9388.01, 37, 4.44, 4535.06, 36, 2.16, 28237.23, 36, 2.54, 242.73, 36, 0.22, 5429.88, 35, 6.15, 19800.95, 35, 2.92, 36949.23, 34, 5.63, 2379.16, 34, 5.73, 16460.33, 34, 5.11, 5849.36, 33, 6.19, 6268.85, 10301861, 1.10748970, 6283.07584999, 172124, 1.064423, 12566.151700, 70222, 3.14159, 0.00000, 3235, 1.0217, 18849.2275, 3080, 2.8435, 5507.5532, 2497, 1.3191, 5223.6939, 1849, 1.4243, 1577.3435, 1008, 5.9138, 10977.0788, 865, 1.420, 6275.962, 863, 0.271, 5486.778, 507, 1.686, 5088.629, 499, 6.014, 6286.599, 467, 5.987, 529.691, 440, 0.518, 4694.003, 410, 1.084, 9437.763, 387, 4.750, 2544.314, 375, 5.071, 796.298, 352, 0.023, 83996.847, 344, 0.949, 71430.696, 341, 5.412, 775.523, 322, 6.156, 2146.165, 286, 5.484, 10447.388, 284, 3.420, 2352.866, 255, 6.132, 6438.496, 252, 0.243, 398.149, 243, 3.092, 4690.480, 225, 3.689, 7084.897, 220, 4.952, 6812.767, 219, 0.420, 8031.092, 209, 1.282, 1748.016, 193, 5.314, 8429.241, 185, 1.820, 7632.943, 175, 3.229, 6279.553, 173, 1.537, 4705.732, 158, 4.097, 11499.656, 158, 5.539, 3154.687, 150, 3.633, 11513.883, 148, 3.222, 7234.794, 147, 3.653, 1194.447, 144, 0.817, 14143.495, 135, 6.151, 5746.271, 134, 4.644, 6836.645, 128, 2.693, 1349.867, 123, 5.650, 5760.498, 118, 2.577, 13367.973, 113, 3.357, 17789.846, 110, 4.497, 4292.331, 108, 5.828, 12036.461, 102, 5.621, 6256.778, 99, 1.14, 1059.38, 98, 0.66, 5856.48, 93, 2.32, 10213.29, 92, 0.77, 16730.46, 88, 1.50, 11926.25, 86, 1.42, 5753.38, 85, 0.66, 155.42, 81, 1.64, 6681.22, 80, 4.11, 951.72, 66, 4.55, 5216.58, 65, 0.98, 25132.30, 64, 4.19, 6040.35, 64, 0.52, 6290.19, 63, 1.51, 5643.18, 59, 6.18, 4164.31, 57, 2.30, 10973.56, 55, 2.32, 11506.77, 55, 2.20, 1592.60, 55, 5.27, 3340.61, 54, 5.54, 553.57, 53, 5.04, 9917.70, 53, 0.92, 11371.70, 52, 3.98, 17298.18, 52, 3.60, 10969.97, 49, 5.91, 3894.18, 49, 2.51, 6127.66, 48, 1.67, 12168.00, 46, 0.31, 801.82, 42, 3.70, 10575.41, 42, 4.05, 10984.19, 40, 2.17, 7860.42, 40, 4.17, 26.30, 38, 5.82, 7058.60, 37, 3.39, 6496.37, 36, 1.08, 6309.37, 36, 5.34, 7079.37, 34, 3.62, 11790.63, 32, 0.32, 16200.77, 31, 4.24, 3738.76, 29, 4.55, 11856.22, 29, 1.26, 8635.94, 27, 3.45, 5884.93, 26, 5.08, 10177.26, 26, 5.38, 21228.39, 24, 2.26, 11712.96, 24, 1.05, 242.73, 24, 5.59, 6069.78, 23, 3.63, 6284.06, 23, 1.64, 4732.03, 22, 3.46, 213.30, 21, 1.05, 3496.03, 21, 3.92, 13916.02, 21, 4.01, 5230.81, 20, 5.16, 12352.85, 20, 0.69, 1990.75, 19, 2.73, 6062.66, 19, 5.01, 11015.11, 18, 6.04, 6283.01, 18, 2.85, 7238.68, 18, 5.60, 6283.14, 18, 5.16, 17253.04, 18, 2.54, 14314.17, 17, 1.58, 7.11, 17, 0.98, 3930.21, 17, 4.75, 17267.27, 16, 2.19, 6076.89, 16, 2.19, 18073.70, 16, 6.12, 3.52, 16, 4.61, 9623.69, 16, 3.40, 16496.36, 15, 0.19, 9779.11, 15, 5.30, 13517.87, 15, 4.26, 3128.39, 15, 0.81, 709.93, 14, 0.50, 25158.60, 14, 4.38, 4136.91, 13, 0.98, 65147.62, 13, 3.31, 154717.61, 13, 2.11, 1589.07, 13, 1.92, 22483.85, 12, 6.03, 9225.54, 12, 1.53, 12559.04, 12, 5.82, 6282.10, 12, 5.61, 5642.20, 12, 2.38, 167283.76, 12, 0.39, 12132.44, 12, 3.98, 4686.89, 12, 5.81, 12569.67, 12, 0.56, 5849.36, 11, 0.45, 6172.87, 11, 5.80, 16858.48, 11, 6.22, 12146.67, 11, 2.27, 5429.88, 435939, 5.784551, 6283.075850, 12363, 5.57935, 12566.15170, 1234, 3.1416, 0.0000, 879, 3.628, 77713.771, 569, 1.870, 5573.143, 330, 5.470, 18849.228, 147, 4.480, 5507.553, 110, 2.842, 161000.686, 101, 2.815, 5223.694, 85, 3.11, 1577.34, 65, 5.47, 775.52, 61, 1.38, 6438.50, 50, 4.42, 6286.60, 47, 3.66, 7084.90, 46, 5.39, 149854.40, 42, 0.90, 10977.08, 40, 3.20, 5088.63, 35, 1.81, 5486.78, 32, 5.35, 3154.69, 30, 3.52, 796.30, 29, 4.62, 4690.48, 28, 1.84, 4694.00, 27, 3.14, 71430.70, 27, 6.17, 6836.65, 26, 1.42, 2146.17, 25, 2.81, 1748.02, 24, 2.18, 155.42, 23, 4.76, 7234.79, 21, 3.38, 7632.94, 21, 0.22, 4705.73, 20, 4.22, 1349.87, 20, 2.01, 1194.45, 20, 4.58, 529.69, 19, 1.59, 6309.37, 18, 5.70, 6040.35, 18, 6.03, 4292.33, 17, 2.90, 9437.76, 17, 2.00, 8031.09, 17, 5.78, 83996.85, 16, 0.05, 2544.31, 15, 0.95, 6127.66, 14, 0.36, 10447.39, 14, 1.48, 2352.87, 13, 0.77, 553.57, 13, 5.48, 951.72, 13, 5.27, 6279.55, 13, 3.76, 6812.77, 11, 5.41, 6256.78, 10, 0.68, 1592.60, 10, 4.95, 398.15, 10, 1.15, 3894.18, 10, 5.20, 244287.60, 10, 1.94, 11856.22, 9, 5.39, 25132.30, 8, 6.18, 1059.38, 8, 0.69, 8429.24, 8, 5.85, 242.73, 7, 5.26, 14143.50, 7, 0.52, 801.82, 6, 2.24, 8635.94, 6, 4.00, 13367.97, 6, 2.77, 90955.55, 6, 5.17, 7058.60, 5, 1.46, 233141.31, 5, 4.13, 7860.42, 5, 3.91, 26.30, 5, 3.89, 12036.46, 5, 5.58, 6290.19, 5, 5.54, 1990.75, 5, 0.83, 11506.77, 5, 6.22, 6681.22, 4, 5.26, 10575.41, 4, 1.91, 7477.52, 4, 0.43, 10213.29, 4, 1.09, 709.93, 4, 5.09, 11015.11, 4, 4.22, 88860.06, 4, 3.57, 7079.37, 4, 1.98, 6284.06, 4, 3.93, 10973.56, 4, 6.18, 9917.70, 4, 0.36, 10177.26, 4, 2.75, 3738.76, 4, 3.33, 5643.18, 4, 5.36, 25158.60, 14459, 4.27319, 6283.07585, 673, 3.917, 12566.152, 77, 0.00, 0.00, 25, 3.73, 18849.23, 4, 2.80, 6286.60, 386, 2.564, 6283.076, 31, 2.27, 12566.15, 5, 3.44, 5573.14, 2, 2.05, 18849.23, 1, 2.06, 77713.77, 1, 4.41, 161000.69, 1, 3.82, 149854.40, 1, 4.08, 6127.66, 1, 5.26, 6438.50, 9, 1.22, 6283.08, 1, 0.66, 12566.15], + XL1:[ + [22639.586, 0.78475822, 8328.691424623, 1.5229241, 25.0719, -0.123598, 4586.438, 0.1873974, 7214.06286536, -2.184756, -18.860, 0.08280, 2369.914, 2.5429520, 15542.75428998, -0.661832, 6.212, -0.04080, 769.026, 3.140313, 16657.38284925, 3.04585, 50.144, -0.2472, 666.418, 1.527671, 628.30195521, -0.02664, 0.062, -0.0054, 411.596, 4.826607, 16866.9323150, -1.28012, -1.07, -0.0059, 211.656, 4.115028, -1114.6285593, -3.70768, -43.93, 0.2064, 205.436, 0.230523, 6585.7609101, -2.15812, -18.92, 0.0882, 191.956, 4.898507, 23871.4457146, 0.86109, 31.28, -0.164, 164.729, 2.586078, 14914.4523348, -0.6352, 6.15, -0.035, 147.321, 5.45530, -7700.3894694, -1.5496, -25.01, 0.118, 124.988, 0.48608, 7771.3771450, -0.3309, 3.11, -0.020, 109.380, 3.88323, 8956.9933798, 1.4963, 25.13, -0.129, 55.177, 5.57033, -1324.1780250, 0.6183, 7.3, -0.035, 45.100, 0.89898, 25195.623740, 0.2428, 24.0, -0.129, 39.533, 3.81213, -8538.240890, 2.8030, 26.1, -0.118, 38.430, 4.30115, 22756.817155, -2.8466, -12.6, 0.042, 36.124, 5.49587, 24986.074274, 4.5688, 75.2, -0.371, 30.773, 1.94559, 14428.125731, -4.3695, -37.7, 0.166, 28.397, 3.28586, 7842.364821, -2.2114, -18.8, 0.077, 24.358, 5.64142, 16171.056245, -0.6885, 6.3, -0.046, 18.585, 4.41371, -557.314280, -1.8538, -22.0, 0.10, 17.954, 3.58454, 8399.679100, -0.3576, 3.2, -0.03, 14.530, 4.9416, 23243.143759, 0.888, 31.2, -0.16, 14.380, 0.9709, 32200.137139, 2.384, 56.4, -0.29, 14.251, 5.7641, -2.301200, 1.523, 25.1, -0.12, 13.899, 0.3735, 31085.508580, -1.324, 12.4, -0.08, 13.194, 1.7595, -9443.319984, -5.231, -69.0, 0.33, 9.679, 3.0997, -16029.080894, -3.072, -50.1, 0.24, 9.366, 0.3016, 24080.995180, -3.465, -19.9, 0.08, 8.606, 4.1582, -1742.930514, -3.681, -44.0, 0.21, 8.453, 2.8416, 16100.068570, 1.192, 28.2, -0.14, 8.050, 2.6292, 14286.150380, -0.609, 6.1, -0.03, 7.630, 6.2388, 17285.684804, 3.019, 50.2, -0.25, 7.447, 1.4845, 1256.603910, -0.053, 0.1, -0.01, 7.371, 0.2736, 5957.458955, -2.131, -19.0, 0.09, 7.063, 5.6715, 33.757047, -0.308, -3.6, 0.02, 6.383, 4.7843, 7004.513400, 2.141, 32.4, -0.16, 5.742, 2.6572, 32409.686605, -1.942, 5, -0.05, 4.374, 4.3443, 22128.51520, -2.820, -13, 0.05, 3.998, 3.2545, 33524.31516, 1.766, 49, -0.25, 3.210, 2.2443, 14985.44001, -2.516, -16, 0.06, 2.915, 1.7138, 24499.74767, 0.834, 31, -0.17, 2.732, 1.9887, 13799.82378, -4.343, -38, 0.17, 2.568, 5.4122, -7072.08751, -1.576, -25, 0.11, 2.521, 3.2427, 8470.66678, -2.238, -19, 0.07, 2.489, 4.0719, -486.32660, -3.734, -44, 0.20, 2.146, 5.6135, -1952.47998, 0.645, 7, -0.03, 1.978, 2.7291, 39414.20000, 0.199, 37, -0.21, 1.934, 1.5682, 33314.76570, 6.092, 100, -0.5, 1.871, 0.4166, 30457.20662, -1.297, 12, -0.1, 1.753, 2.0582, -8886.00570, -3.38, -47, 0.2, 1.437, 2.386, -695.87607, 0.59, 7, 0, 1.373, 3.026, -209.54947, 4.33, 51, -0.2, 1.262, 5.940, 16728.37052, 1.17, 28, -0.1, 1.224, 6.172, 6656.74859, -4.04, -41, 0.2, 1.187, 5.873, 6099.43431, -5.89, -63, 0.3, 1.177, 1.014, 31571.83518, 2.41, 56, -0.3, 1.162, 3.840, 9585.29534, 1.47, 25, -0.1, 1.143, 5.639, 8364.73984, -2.18, -19, 0.1, 1.078, 1.229, 70.98768, -1.88, -22, 0.1, 1.059, 3.326, 40528.82856, 3.91, 81, -0.4, 0.990, 5.013, 40738.37803, -0.42, 30, -0.2, 0.948, 5.687, -17772.01141, -6.75, -94, 0.5, 0.876, 0.298, -0.35232, 0, 0, 0, 0.822, 2.994, 393.02097, 0, 0, 0, 0.788, 1.836, 8326.39022, 3.05, 50, -0.2, 0.752, 4.985, 22614.84180, 0.91, 31, -0.2, 0.740, 2.875, 8330.99262, 0, 0, 0, 0.669, 0.744, -24357.77232, -4.60, -75, 0.4, 0.644, 1.314, 8393.12577, -2.18, -19, 0.1, 0.639, 5.888, 575.33849, 0, 0, 0, 0.635, 1.116, 23385.11911, -2.87, -13, 0, 0.584, 5.197, 24428.75999, 2.71, 53, -0.3, 0.583, 3.513, -9095.55517, 0.95, 4, 0, 0.572, 6.059, 29970.88002, -5.03, -32, 0.1, 0.565, 2.960, 0.32863, 1.52, 25, -0.1, 0.561, 4.001, -17981.56087, -2.43, -43, 0.2, 0.557, 0.529, 7143.07519, -0.30, 3, 0, 0.546, 2.311, 25614.37623, 4.54, 75, -0.4, 0.536, 4.229, 15752.30376, -4.99, -45, 0.2, 0.493, 3.316, -8294.9344, -1.83, -29, 0.1, 0.491, 1.744, 8362.4485, 1.21, 21, -0.1, 0.478, 1.803, -10071.6219, -5.20, -69, 0.3, 0.454, 0.857, 15333.2048, 3.66, 57, -0.3, 0.445, 2.071, 8311.7707, -2.18, -19, 0.1, 0.426, 0.345, 23452.6932, -3.44, -20, 0.1, 0.420, 4.941, 33733.8646, -2.56, -2, 0, 0.413, 1.642, 17495.2343, -1.31, -1, 0, 0.404, 1.458, 23314.1314, -0.99, 9, -0.1, 0.395, 2.132, 38299.5714, -3.51, -6, 0, 0.382, 2.700, 31781.3846, -1.92, 5, 0, 0.375, 4.827, 6376.2114, 2.17, 32, -0.2, 0.361, 3.867, 16833.1753, -0.97, 3, 0, 0.358, 5.044, 15056.4277, -4.40, -38, 0.2, 0.350, 5.157, -8257.7037, -3.40, -47, 0.2, 0.344, 4.233, 157.7344, 0, 0, 0, 0.340, 2.672, 13657.8484, -0.58, 6, 0, 0.329, 5.610, 41853.0066, 3.29, 74, -0.4, 0.325, 5.895, -39.8149, 0, 0, 0, 0.309, 4.387, 21500.2132, -2.79, -13, 0.1, 0.302, 1.278, 786.0419, 0, 0, 0, 0.302, 5.341, -24567.3218, -0.27, -24, 0.1, 0.301, 1.045, 5889.8848, -1.57, -12, 0, 0.294, 4.201, -2371.2325, -3.65, -44, 0.2, 0.293, 3.704, 21642.1886, -6.55, -57, 0.2, 0.290, 4.069, 32828.4391, 2.36, 56, -0.3, 0.289, 3.472, 31713.8105, -1.35, 12, -0.1, 0.285, 5.407, -33.7814, 0.31, 4, 0, 0.283, 5.998, -16.9207, -3.71, -44, 0.2, 0.283, 2.772, 38785.8980, 0.23, 37, -0.2, 0.274, 5.343, 15613.7420, -2.54, -16, 0.1, 0.263, 3.997, 25823.9257, 0.22, 24, -0.1, 0.254, 0.600, 24638.3095, -1.61, 2, 0, 0.253, 1.344, 6447.1991, 0.29, 10, -0.1, 0.250, 0.887, 141.9754, -3.76, -44, 0.2, 0.247, 0.317, 5329.1570, -2.10, -19, 0.1, 0.245, 0.141, 36.0484, -3.71, -44, 0.2, 0.231, 2.287, 14357.1381, -2.49, -16, 0.1, 0.227, 5.158, 2.6298, 0, 0, 0, 0.219, 5.085, 47742.8914, 1.72, 63, -0.3, 0.211, 2.145, 6638.7244, -2.18, -19, 0.1, 0.201, 4.415, 39623.7495, -4.13, -14, 0, 0.194, 2.091, 588.4927, 0, 0, 0, 0.193, 3.057, -15400.7789, -3.10, -50, 0, 0.186, 5.598, 16799.3582, -0.72, 6, 0, 0.185, 3.886, 1150.6770, 0, 0, 0, 0.183, 1.619, 7178.0144, 1.52, 25, 0, 0.181, 2.635, 8328.3391, 1.52, 25, 0, 0.181, 2.077, 8329.0437, 1.52, 25, 0, 0.179, 3.215, -9652.8694, -0.90, -18, 0, 0.176, 1.716, -8815.0180, -5.26, -69, 0, 0.175, 5.673, 550.7553, 0, 0, 0, 0.170, 2.060, 31295.0580, -5.6, -39, 0, 0.167, 1.239, 7211.7617, -0.7, 6, 0, 0.165, 4.499, 14967.4158, -0.7, 6, 0, 0.164, 3.595, 15540.4531, 0.9, 31, 0, 0.164, 4.237, 522.3694, 0, 0, 0, 0.163, 4.633, 15545.0555, -2.2, -19, 0, 0.161, 0.478, 6428.0209, -2.2, -19, 0, 0.158, 2.03, 13171.5218, -4.3, -38, 0, 0.157, 2.28, 7216.3641, -3.7, -44, 0, 0.154, 5.65, 7935.6705, 1.5, 25, 0, 0.152, 0.46, 29828.9047, -1.3, 12, 0, 0.151, 1.19, -0.7113, 0, 0, 0, 0.150, 1.42, 23942.4334, -1.0, 9, 0, 0.144, 2.75, 7753.3529, 1.5, 25, 0, 0.137, 2.08, 7213.7105, -2.2, -19, 0, 0.137, 1.44, 7214.4152, -2.2, -19, 0, 0.136, 4.46, -1185.6162, -1.8, -22, 0, 0.136, 3.03, 8000.1048, -2.2, -19, 0, 0.134, 2.83, 14756.7124, -0.7, 6, 0, 0.131, 5.05, 6821.0419, -2.2, -19, 0, 0.128, 5.99, -17214.6971, -4.9, -72, 0, 0.127, 5.35, 8721.7124, 1.5, 25, 0, 0.126, 4.49, 46628.2629, -2.0, 19, 0, 0.125, 5.94, 7149.6285, 1.5, 25, 0, 0.124, 1.09, 49067.0695, 1.1, 55, 0, 0.121, 2.88, 15471.7666, 1.2, 28, 0, 0.111, 3.92, 41643.4571, 7.6, 125, -1, 0.110, 1.96, 8904.0299, 1.5, 25, 0, 0.106, 3.30, -18.0489, -2.2, -19, 0, 0.105, 2.30, -4.9310, 1.5, 25, 0, 0.104, 2.22, -6.5590, -1.9, -22, 0, 0.101, 1.44, 1884.9059, -0.1, 0, 0, 0.100, 5.92, 5471.1324, -5.9, -63, 0, 0.099, 1.12, 15149.7333, -0.7, 6, 0, 0.096, 4.73, 15508.9972, -0.4, 10, 0, 0.095, 5.18, 7230.9835, 1.5, 25, 0, 0.093, 3.37, 39900.5266, 3.9, 81, 0, 0.092, 2.01, 25057.0619, 2.7, 53, 0, 0.092, 1.21, -79.6298, 0, 0, 0, 0.092, 1.65, -26310.2523, -4.0, -68, 0, 0.091, 1.01, 42062.5561, -1.0, 23, 0, 0.090, 6.10, 29342.5781, -5.0, -32, 0, 0.090, 4.43, 15542.4020, -0.7, 6, 0, 0.090, 3.80, 15543.1066, -0.7, 6, 0, 0.089, 4.15, 6063.3859, -2.2, -19, 0, 0.086, 4.03, 52.9691, 0, 0, 0, 0.085, 0.49, 47952.4409, -2.6, 11, 0, 0.085, 1.60, 7632.8154, 2.1, 32, 0, 0.084, 0.22, 14392.0773, -0.7, 6, 0, 0.083, 6.22, 6028.4466, -4.0, -41, 0, 0.083, 0.63, -7909.9389, 2.8, 26, 0, 0.083, 5.20, -77.5523, 0, 0, 0, 0.082, 2.74, 8786.1467, -2.2, -19, 0, 0.080, 2.43, 9166.5428, -2.8, -26, 0, 0.080, 3.70, -25405.1732, 4.1, 27, 0, 0.078, 5.68, 48857.5200, 5.4, 106, -1, 0.077, 1.85, 8315.5735, -2.2, -19, 0, 0.075, 5.46, -18191.1103, 1.9, 8, 0, 0.075, 1.41, -16238.6304, 1.3, 1, 0, 0.074, 5.06, 40110.0761, -0.4, 30, 0, 0.072, 2.10, 64.4343, -3.7, -44, 0, 0.071, 2.17, 37671.2695, -3.5, -6, 0, 0.069, 1.71, 16693.4313, -0.7, 6, 0, 0.069, 3.33, -26100.7028, -8.3, -119, 1, 0.068, 1.09, 8329.4028, 1.5, 25, 0, 0.068, 3.62, 8327.9801, 1.5, 25, 0, 0.068, 2.41, 16833.1509, -1.0, 3, 0, 0.067, 3.40, 24709.2971, -3.5, -20, 0, 0.067, 1.65, 8346.7156, -0.3, 3, 0, 0.066, 2.61, 22547.2677, 1.5, 39, 0, 0.066, 3.50, 15576.5113, -1.0, 3, 0, 0.065, 5.76, 33037.9886, -2.0, 5, 0, 0.065, 4.58, 8322.1325, -0.3, 3, 0, 0.065, 6.20, 17913.9868, 3.0, 50, 0, 0.065, 1.50, 22685.8295, -1.0, 9, 0, 0.065, 2.37, 7180.3058, -1.9, -15, 0, 0.064, 1.06, 30943.5332, 2.4, 56, 0, 0.064, 1.89, 8288.8765, 1.5, 25, 0, 0.064, 4.70, 6.0335, 0.3, 4, 0, 0.063, 2.83, 8368.5063, 1.5, 25, 0, 0.063, 5.66, -2580.7819, 0.7, 7, 0, 0.062, 3.78, 7056.3285, -2.2, -19, 0, 0.061, 1.49, 8294.9100, 1.8, 29, 0, 0.061, 0.12, -10281.1714, -0.9, -18, 0, 0.061, 3.06, -8362.4729, -1.2, -21, 0, 0.061, 4.43, 8170.9571, 1.5, 25, 0, 0.059, 5.78, -13.1179, -3.7, -44, 0, 0.059, 5.97, 6625.5702, -2.2, -19, 0, 0.058, 5.01, -0.5080, -0.3, 0, 0, 0.058, 2.73, 7161.0938, -2.2, -19, 0, 0.057, 0.19, 7214.0629, -2.2, -19, 0, 0.057, 4.00, 22199.5029, -4.7, -35, 0, 0.057, 5.38, 8119.1420, 5.8, 76, 0, 0.056, 1.07, 7542.6495, 1.5, 25, 0, 0.056, 0.28, 8486.4258, 1.5, 25, 0, 0.054, 4.19, 16655.0816, 4.6, 75, 0, 0.053, 0.72, 7267.0320, -2.2, -19, 0, 0.053, 3.12, 12.6192, 0.6, 7, 0, 0.052, 2.99, -32896.013, -1.8, -49, 0, 0.052, 3.46, 1097.708, 0, 0, 0, 0.051, 5.37, -6443.786, -1.6, -25, 0, 0.051, 1.35, 7789.401, -2.2, -19, 0, 0.051, 5.83, 40042.502, 0.2, 38, 0, 0.051, 3.63, 9114.733, 1.5, 25, 0, 0.050, 1.51, 8504.484, -2.5, -22, 0, 0.050, 5.23, 16659.684, 1.5, 25, 0, 0.050, 1.15, 7247.820, -2.5, -23, 0, 0.047, 0.25, -1290.421, 0.3, 0, 0, 0.047, 4.67, -32686.464, -6.1, -100, 0, 0.047, 3.49, 548.678, 0, 0, 0, 0.047, 2.37, 6663.308, -2.2, -19, 0, 0.046, 0.98, 1572.084, 0, 0, 0, 0.046, 2.04, 14954.262, -0.7, 6, 0, 0.046, 3.72, 6691.693, -2.2, -19, 0, 0.045, 6.19, -235.287, 0, 0, 0, 0.044, 2.96, 32967.001, -0.1, 27, 0, 0.044, 3.82, -1671.943, -5.6, -66, 0, 0.043, 5.82, 1179.063, 0, 0, 0, 0.043, 0.07, 34152.617, 1.7, 49, 0, 0.043, 3.71, 6514.773, -0.3, 0, 0, 0.043, 5.62, 15.732, -2.5, -23, 0, 0.043, 5.80, 8351.233, -2.2, -19, 0, 0.042, 0.27, 7740.199, 1.5, 25, 0, 0.042, 6.14, 15385.020, -0.7, 6, 0, 0.042, 6.13, 7285.051, -4.1, -41, 0, 0.041, 1.27, 32757.451, 4.2, 78, 0, 0.041, 4.46, 8275.722, 1.5, 25, 0, 0.040, 0.23, 8381.661, 1.5, 25, 0, 0.040, 5.87, -766.864, 2.5, 29, 0, 0.040, 1.66, 254.431, 0, 0, 0, 0.040, 0.40, 9027.981, -0.4, 0, 0, 0.040, 2.96, 7777.936, 1.5, 25, 0, 0.039, 4.67, 33943.068, 6.1, 100, 0, 0.039, 3.52, 8326.062, 1.5, 25, 0, 0.039, 3.75, 21013.887, -6.5, -57, 0, 0.039, 5.60, 606.978, 0, 0, 0, 0.039, 1.19, 8331.321, 1.5, 25, 0, 0.039, 2.84, 7211.433, -2.2, -19, 0, 0.038, 0.67, 7216.693, -2.2, -19, 0, 0.038, 6.22, 25161.867, 0.6, 28, 0, 0.038, 4.40, 7806.322, 1.5, 25, 0, 0.038, 4.16, 9179.168, -2.2, -19, 0, 0.037, 4.73, 14991.999, -0.7, 6, 0, 0.036, 0.35, 67.514, -0.6, -7, 0, 0.036, 3.70, 25266.611, -1.6, 0, 0, 0.036, 5.39, 16328.796, -0.7, 6, 0, 0.035, 1.44, 7174.248, -2.2, -19, 0, 0.035, 5.00, 15684.730, -4.4, -38, 0, 0.035, 0.39, -15.419, -2.2, -19, 0, 0.035, 6.07, 15020.385, -0.7, 6, 0, 0.034, 6.01, 7371.797, -2.2, -19, 0, 0.034, 0.96, -16623.626, -3.4, -54, 0, 0.033, 6.24, 9479.368, 1.5, 25, 0, 0.033, 3.21, 23661.896, 5.2, 82, 0, 0.033, 4.06, 8311.418, -2.2, -19, 0, 0.033, 2.40, 1965.105, 0, 0, 0, 0.033, 5.17, 15489.785, -0.7, 6, 0, 0.033, 5.03, 21986.540, 0.9, 31, 0, 0.033, 4.10, 16691.140, 2.7, 46, 0, 0.033, 5.13, 47114.589, 1.7, 63, 0, 0.033, 4.45, 8917.184, 1.5, 25, 0, 0.033, 4.23, 2.078, 0, 0, 0, 0.032, 2.33, 75.251, 1.5, 25, 0, 0.032, 2.10, 7253.878, -2.2, -19, 0, 0.032, 3.11, -0.224, 1.5, 25, 0, 0.032, 4.43, 16640.462, -0.7, 6, 0, 0.032, 5.68, 8328.363, 0, 0, 0, 0.031, 5.32, 8329.020, 3.0, 50, 0, 0.031, 3.70, 16118.093, -0.7, 6, 0, 0.030, 3.67, 16721.817, -0.7, 6, 0, 0.030, 5.27, -1881.492, -1.2, -15, 0, 0.030, 5.72, 8157.839, -2.2, -19, 0, 0.029, 5.73, -18400.313, -6.7, -94, 0, 0.029, 2.76, 16.000, -2.2, -19, 0, 0.029, 1.75, 8879.447, 1.5, 25, 0, 0.029, 0.32, 8851.061, 1.5, 25, 0, 0.029, 0.90, 14704.903, 3.7, 57, 0, 0.028, 2.90, 15595.723, -0.7, 6, 0, 0.028, 5.88, 16864.631, 0.2, 24, 0, 0.028, 0.63, 16869.234, -2.8, -26, 0, 0.028, 4.04, -18609.863, -2.4, -43, 0, 0.027, 5.83, 6727.736, -5.9, -63, 0, 0.027, 6.12, 418.752, 4.3, 51, 0, 0.027, 0.14, 41157.131, 3.9, 81, 0, 0.026, 3.80, 15.542, 0, 0, 0, 0.026, 1.68, 50181.698, 4.8, 99, -1, 0.026, 0.32, 315.469, 0, 0, 0, 0.025, 5.67, 19.188, 0.3, 0, 0, 0.025, 3.16, 62.133, -2.2, -19, 0, 0.025, 3.76, 15502.939, -0.7, 6, 0, 0.025, 4.53, 45999.961, -2.0, 19, 0, 0.024, 3.21, 837.851, -4.4, -51, 0, 0.024, 2.82, 38157.596, 0.3, 37, 0, 0.024, 5.21, 15540.124, -0.7, 6, 0, 0.024, 0.26, 14218.576, 0, 13, 0, 0.024, 3.01, 15545.384, -0.7, 6, 0, 0.024, 1.16, -17424.247, -0.6, -21, 0, 0.023, 2.34, -67.574, 0.6, 7, 0, 0.023, 2.44, 18.024, -1.9, -22, 0, 0.023, 3.70, 469.400, 0, 0, 0, 0.023, 0.72, 7136.511, -2.2, -19, 0, 0.023, 4.50, 15582.569, -0.7, 6, 0, 0.023, 2.80, -16586.395, -4.9, -72, 0, 0.023, 1.51, 80.182, 0, 0, 0, 0.023, 1.09, 5261.583, -1.5, -12, 0, 0.023, 0.56, 54956.954, -0.5, 44, 0, 0.023, 4.01, 8550.860, -2.2, -19, 0, 0.023, 4.46, 38995.448, -4.1, -14, 0, 0.023, 3.82, 2358.126, 0, 0, 0, 0.022, 3.77, 32271.125, 0.5, 34, 0, 0.022, 0.82, 15935.775, -0.7, 6, 0, 0.022, 1.07, 24013.421, -2.9, -13, 0, 0.022, 0.40, 8940.078, -2.2, -19, 0, 0.022, 2.06, 15700.489, -0.7, 6, 0, 0.022, 4.27, 15124.002, -5.0, -45, 0, 0.021, 1.16, 56071.583, 3.2, 88, 0, 0.021, 5.58, 9572.189, -2.2, -19, 0, 0.020, 1.70, -17.273, -3.7, -44, 0, 0.020, 3.05, 214.617, 0, 0, 0, 0.020, 4.41, 8391.048, -2.2, -19, 0, 0.020, 5.95, 23869.145, 2.4, 56, 0, 0.020, 0.42, 40947.927, -4.7, -21, 0, 0.019, 1.39, 5818.897, 0.3, 10, 0, 0.019, 0.71, 23873.747, -0.7, 6, 0, 0.019, 2.81, 7291.615, -2.2, -19, 0, 0.019, 5.09, 8428.018, -2.2, -19, 0, 0.019, 4.14, 6518.187, -1.6, -12, 0, 0.019, 3.85, 21.330, 0, 0, 0, 0.018, 0.66, 14445.046, -0.7, 6, 0, 0.018, 1.65, 0.966, -4.0, -48, 0, 0.018, 5.64, -17143.709, -6.8, -94, 0, 0.018, 6.01, 7736.432, -2.2, -19, 0, 0.018, 2.74, 31153.083, -1.9, 5, 0, 0.018, 4.58, 6116.355, -2.2, -19, 0, 0.018, 2.28, 46.401, 0.3, 0, 0, 0.018, 3.80, 10213.597, 1.4, 25, 0, 0.018, 2.84, 56281.132, -1.1, 36, 0, 0.018, 3.53, 8249.062, 1.5, 25, 0, 0.017, 4.43, 20871.911, -3, -13, 0, 0.017, 4.44, 627.596, 0, 0, 0, 0.017, 1.85, 628.308, 0, 0, 0, 0.017, 1.19, 8408.321, 2, 25, 0, 0.017, 1.95, 7214.056, -2, -19, 0, 0.017, 1.57, 7214.070, -2, -19, 0, 0.017, 1.65, 13870.811, -6, -60, 0, 0.017, 0.30, 22.542, -4, -44, 0, 0.017, 2.62, -119.445, 0, 0, 0, 0.016, 4.87, 5747.909, 2, 32, 0, 0.016, 4.45, 14339.108, -1, 6, 0, 0.016, 1.83, 41366.680, 0, 30, 0, 0.016, 4.53, 16309.618, -3, -23, 0, 0.016, 2.54, 15542.754, -1, 6, 0, 0.016, 6.05, 1203.646, 0, 0, 0, 0.015, 5.2, 2751.147, 0, 0, 0, 0.015, 1.8, -10699.924, -5, -69, 0, 0.015, 0.4, 22824.391, -3, -20, 0, 0.015, 2.1, 30666.756, -6, -39, 0, 0.015, 2.1, 6010.417, -2, -19, 0, 0.015, 0.7, -23729.470, -5, -75, 0, 0.015, 1.4, 14363.691, -1, 6, 0, 0.015, 5.8, 16900.689, -2, 0, 0, 0.015, 5.2, 23800.458, 3, 53, 0, 0.015, 5.3, 6035.000, -2, -19, 0, 0.015, 1.2, 8251.139, 2, 25, 0, 0.015, 3.6, -8.860, 0, 0, 0, 0.015, 0.8, 882.739, 0, 0, 0, 0.015, 3.0, 1021.329, 0, 0, 0, 0.015, 0.6, 23296.107, 1, 31, 0, 0.014, 5.4, 7227.181, 2, 25, 0, 0.014, 0.1, 7213.352, -2, -19, 0, 0.014, 4.0, 15506.706, 3, 50, 0, 0.014, 3.4, 7214.774, -2, -19, 0, 0.014, 4.6, 6665.385, -2, -19, 0, 0.014, 0.1, -8.636, -2, -22, 0, 0.014, 3.1, 15465.202, -1, 6, 0, 0.014, 4.9, 508.863, 0, 0, 0, 0.014, 3.5, 8406.244, 2, 25, 0, 0.014, 1.3, 13313.497, -8, -82, 0, 0.014, 2.8, 49276.619, -3, 0, 0, 0.014, 0.1, 30528.194, -3, -10, 0, 0.013, 1.7, 25128.050, 1, 31, 0, 0.013, 2.9, 14128.405, -1, 6, 0, 0.013, 3.4, 57395.761, 3, 80, 0, 0.013, 2.7, 13029.546, -1, 6, 0, 0.013, 3.9, 7802.556, -2, -19, 0, 0.013, 1.6, 8258.802, -2, -19, 0, 0.013, 2.2, 8417.709, -2, -19, 0, 0.013, 0.7, 9965.210, -2, -19, 0, 0.013, 3.4, 50391.247, 0, 48, 0, 0.013, 3.0, 7134.433, -2, -19, 0, 0.013, 2.9, 30599.182, -5, -31, 0, 0.013, 3.6, -9723.857, 1, 0, 0, 0.013, 4.8, 7607.084, -2, -19, 0, 0.012, 0.8, 23837.689, 1, 35, 0, 0.012, 3.6, 4.409, -4, -44, 0, 0.012, 5.0, 16657.031, 3, 50, 0, 0.012, 4.4, 16657.735, 3, 50, 0, 0.012, 1.1, 15578.803, -4, -38, 0, 0.012, 6.0, -11.490, 0, 0, 0, 0.012, 1.9, 8164.398, 0, 0, 0, 0.012, 2.4, 31852.372, -4, -17, 0, 0.012, 2.4, 6607.085, -2, -19, 0, 0.012, 4.2, 8359.870, 0, 0, 0, 0.012, 0.5, 5799.713, -2, -19, 0, 0.012, 2.7, 7220.622, 0, 0, 0, 0.012, 4.3, -139.720, 0, 0, 0, 0.012, 2.3, 13728.836, -2, -16, 0, 0.011, 3.6, 14912.146, 1, 31, 0, 0.011, 4.7, 14916.748, -2, -19, 0], + [1.67680, 4.66926, 628.301955, -0.0266, 0.1, -0.005, 0.51642, 3.3721, 6585.760910, -2.158, -18.9, 0.09, 0.41383, 5.7277, 14914.452335, -0.635, 6.2, -0.04, 0.37115, 3.9695, 7700.389469, 1.550, 25.0, -0.12, 0.27560, 0.7416, 8956.993380, 1.496, 25.1, -0.13, 0.24599, 4.2253, -2.301200, 1.523, 25.1, -0.12, 0.07118, 0.1443, 7842.36482, -2.211, -19, 0.08, 0.06128, 2.4998, 16171.05625, -0.688, 6, 0, 0.04516, 0.443, 8399.67910, -0.36, 3, 0, 0.04048, 5.771, 14286.15038, -0.61, 6, 0, 0.03747, 4.626, 1256.60391, -0.05, 0, 0, 0.03707, 3.415, 5957.45895, -2.13, -19, 0.1, 0.03649, 1.800, 23243.14376, 0.89, 31, -0.2, 0.02438, 0.042, 16029.08089, 3.07, 50, -0.2, 0.02165, 1.017, -1742.93051, -3.68, -44, 0.2, 0.01923, 3.097, 17285.68480, 3.02, 50, -0.3, 0.01692, 1.280, 0.3286, 1.52, 25, -0.1, 0.01361, 0.298, 8326.3902, 3.05, 50, -0.2, 0.01293, 4.013, 7072.0875, 1.58, 25, -0.1, 0.01276, 4.413, 8330.9926, 0, 0, 0, 0.01270, 0.101, 8470.6668, -2.24, -19, 0.1, 0.01097, 1.203, 22128.5152, -2.82, -13, 0, 0.01088, 2.545, 15542.7543, -0.66, 6, 0, 0.00835, 0.190, 7214.0629, -2.18, -19, 0.1, 0.00734, 4.855, 24499.7477, 0.83, 31, -0.2, 0.00686, 5.130, 13799.8238, -4.34, -38, 0.2, 0.00631, 0.930, -486.3266, -3.73, -44, 0, 0.00585, 0.699, 9585.2953, 1.5, 25, 0, 0.00566, 4.073, 8328.3391, 1.5, 25, 0, 0.00566, 0.638, 8329.0437, 1.5, 25, 0, 0.00539, 2.472, -1952.4800, 0.6, 7, 0, 0.00509, 2.88, -0.7113, 0, 0, 0, 0.00469, 3.56, 30457.2066, -1.3, 12, 0, 0.00387, 0.78, -0.3523, 0, 0, 0, 0.00378, 1.84, 22614.8418, 0.9, 31, 0, 0.00362, 5.53, -695.8761, 0.6, 7, 0, 0.00317, 2.80, 16728.3705, 1.2, 28, 0, 0.00303, 6.07, 157.7344, 0, 0, 0, 0.00300, 2.53, 33.7570, -0.3, -4, 0, 0.00295, 4.16, 31571.8352, 2.4, 56, 0, 0.00289, 5.98, 7211.7617, -0.7, 6, 0, 0.00285, 2.06, 15540.4531, 0.9, 31, 0, 0.00283, 2.65, 2.6298, 0, 0, 0, 0.00282, 6.17, 15545.0555, -2.2, -19, 0, 0.00278, 1.23, -39.8149, 0, 0, 0, 0.00272, 3.82, 7216.3641, -3.7, -44, 0, 0.00270, 4.37, 70.9877, -1.9, -22, 0, 0.00256, 5.81, 13657.8484, -0.6, 6, 0, 0.00244, 5.64, -0.2237, 1.5, 25, 0, 0.00240, 2.96, 8311.7707, -2.2, -19, 0, 0.00239, 0.87, -33.7814, 0.3, 4, 0, 0.00216, 2.31, 15.9995, -2.2, -19, 0, 0.00186, 3.46, 5329.1570, -2.1, -19, 0, 0.00169, 2.40, 24357.772, 4.6, 75, 0, 0.00161, 5.80, 8329.403, 1.5, 25, 0, 0.00161, 5.20, 8327.980, 1.5, 25, 0, 0.00160, 4.26, 23385.119, -2.9, -13, 0, 0.00156, 1.26, 550.755, 0, 0, 0, 0.00155, 1.25, 21500.213, -2.8, -13, 0, 0.00152, 0.60, -16.921, -3.7, -44, 0, 0.00150, 2.71, -79.630, 0, 0, 0, 0.00150, 5.29, 15.542, 0, 0, 0, 0.00148, 1.06, -2371.232, -3.7, -44, 0, 0.00141, 0.77, 8328.691, 1.5, 25, 0, 0.00141, 3.67, 7143.075, -0.3, 0, 0, 0.00138, 5.45, 25614.376, 4.5, 75, 0, 0.00129, 4.90, 23871.446, 0.9, 31, 0, 0.00126, 4.03, 141.975, -3.8, -44, 0, 0.00124, 6.01, 522.369, 0, 0, 0, 0.00120, 4.94, -10071.622, -5.2, -69, 0, 0.00118, 5.07, -15.419, -2.2, -19, 0, 0.00107, 3.49, 23452.693, -3.4, -20, 0, 0.00104, 4.78, 17495.234, -1.3, 0, 0, 0.00103, 1.44, -18.049, -2.2, -19, 0, 0.00102, 5.63, 15542.402, -0.7, 6, 0, 0.00102, 2.59, 15543.107, -0.7, 6, 0, 0.00100, 4.11, -6.559, -1.9, -22, 0, 0.00097, 0.08, 15400.779, 3.1, 50, 0, 0.00096, 5.84, 31781.385, -1.9, 5, 0, 0.00094, 1.08, 8328.363, 0, 0, 0, 0.00094, 2.46, 16799.358, -0.7, 6, 0, 0.00094, 1.69, 6376.211, 2.2, 32, 0, 0.00093, 3.64, 8329.020, 3.0, 50, 0, 0.00093, 2.65, 16655.082, 4.6, 75, 0, 0.00090, 1.90, 15056.428, -4.4, -38, 0, 0.00089, 1.59, 52.969, 0, 0, 0, 0.00088, 2.02, -8257.704, -3.4, -47, 0, 0.00088, 3.02, 7213.711, -2.2, -19, 0, 0.00087, 0.50, 7214.415, -2.2, -19, 0, 0.00087, 0.49, 16659.684, 1.5, 25, 0, 0.00082, 5.64, -4.931, 1.5, 25, 0, 0.00079, 5.17, 13171.522, -4.3, -38, 0, 0.00076, 3.60, 29828.905, -1.3, 12, 0, 0.00076, 4.08, 24567.322, 0.3, 24, 0, 0.00076, 4.58, 1884.906, -0.1, 0, 0, 0.00073, 0.33, 31713.811, -1.4, 12, 0, 0.00073, 0.93, 32828.439, 2.4, 56, 0, 0.00071, 5.91, 38785.898, 0.2, 37, 0, 0.00069, 2.20, 15613.742, -2.5, -16, 0, 0.00066, 3.87, 15.732, -2.5, -23, 0, 0.00066, 0.86, 25823.926, 0.2, 24, 0, 0.00065, 2.52, 8170.957, 1.5, 25, 0, 0.00063, 0.18, 8322.132, -0.3, 0, 0, 0.00060, 5.84, 8326.062, 1.5, 25, 0, 0.00060, 5.15, 8331.321, 1.5, 25, 0, 0.00060, 2.18, 8486.426, 1.5, 25, 0, 0.00058, 2.30, -1.731, -4, -44, 0, 0.00058, 5.43, 14357.138, -2, -16, 0, 0.00057, 3.09, 8294.910, 2, 29, 0, 0.00057, 4.67, -8362.473, -1, -21, 0, 0.00056, 4.15, 16833.151, -1, 0, 0, 0.00054, 1.93, 7056.329, -2, -19, 0, 0.00054, 5.27, 8315.574, -2, -19, 0, 0.00052, 5.6, 8311.418, -2, -19, 0, 0.00052, 2.7, -77.552, 0, 0, 0, 0.00051, 4.3, 7230.984, 2, 25, 0, 0.00050, 0.4, -0.508, 0, 0, 0, 0.00049, 5.4, 7211.433, -2, -19, 0, 0.00049, 4.4, 7216.693, -2, -19, 0, 0.00049, 4.3, 16864.631, 0, 24, 0, 0.00049, 2.2, 16869.234, -3, -26, 0, 0.00047, 6.1, 627.596, 0, 0, 0, 0.00047, 5.0, 12.619, 1, 7, 0, 0.00045, 4.9, -8815.018, -5, -69, 0, 0.00044, 1.6, 62.133, -2, -19, 0, 0.00042, 2.9, -13.118, -4, -44, 0, 0.00042, 4.1, -119.445, 0, 0, 0, 0.00041, 4.3, 22756.817, -3, -13, 0, 0.00041, 3.6, 8288.877, 2, 25, 0, 0.00040, 0.5, 6663.308, -2, -19, 0, 0.00040, 1.1, 8368.506, 2, 25, 0, 0.00039, 4.1, 6443.786, 2, 25, 0, 0.00039, 3.1, 16657.383, 3, 50, 0, 0.00038, 0.1, 16657.031, 3, 50, 0, 0.00038, 3.0, 16657.735, 3, 50, 0, 0.00038, 4.6, 23942.433, -1, 9, 0, 0.00037, 4.3, 15385.020, -1, 6, 0, 0.00037, 5.0, 548.678, 0, 0, 0, 0.00036, 1.8, 7213.352, -2, -19, 0, 0.00036, 1.7, 7214.774, -2, -19, 0, 0.00035, 1.1, 7777.936, 2, 25, 0, 0.00035, 1.6, -8.860, 0, 0, 0, 0.00035, 4.4, 23869.145, 2, 56, 0, 0.00035, 2.0, 6691.693, -2, -19, 0, 0.00034, 1.3, -1185.616, -2, -22, 0, 0.00034, 2.2, 23873.747, -1, 6, 0, 0.00033, 2.0, -235.287, 0, 0, 0, 0.00033, 3.1, 17913.987, 3, 50, 0, 0.00033, 1.0, 8351.233, -2, -19, 0], + [0.004870, 4.6693, 628.30196, -0.027, 0, -0.01, 0.002280, 2.6746, -2.30120, 1.523, 25, -0.12, 0.001500, 3.372, 6585.76091, -2.16, -19, 0.1, 0.001200, 5.728, 14914.45233, -0.64, 6, 0, 0.001080, 3.969, 7700.38947, 1.55, 25, -0.1, 0.000800, 0.742, 8956.99338, 1.50, 25, -0.1, 0.000254, 6.002, 0.3286, 1.52, 25, -0.1, 0.000210, 0.144, 7842.3648, -2.21, -19, 0, 0.000180, 2.500, 16171.0562, -0.7, 6, 0, 0.000130, 0.44, 8399.6791, -0.4, 3, 0, 0.000126, 5.03, 8326.3902, 3.0, 50, 0, 0.000120, 5.77, 14286.1504, -0.6, 6, 0, 0.000118, 5.96, 8330.9926, 0, 0, 0, 0.000110, 1.80, 23243.1438, 0.9, 31, 0, 0.000110, 3.42, 5957.4590, -2.1, -19, 0, 0.000110, 4.63, 1256.6039, -0.1, 0, 0, 0.000099, 4.70, -0.7113, 0, 0, 0, 0.000070, 0.04, 16029.0809, 3.1, 50, 0, 0.000070, 5.14, 8328.3391, 1.5, 25, 0, 0.000070, 5.85, 8329.0437, 1.5, 25, 0, 0.000060, 1.02, -1742.9305, -3.7, -44, 0, 0.000060, 3.10, 17285.6848, 3.0, 50, 0, 0.000054, 5.69, -0.352, 0, 0, 0, 0.000043, 0.52, 15.542, 0, 0, 0, 0.000041, 2.03, 2.630, 0, 0, 0, 0.000040, 0.10, 8470.667, -2.2, -19, 0, 0.000040, 4.01, 7072.088, 1.6, 25, 0, 0.000036, 2.93, -8.860, -0.3, 0, 0, 0.000030, 1.20, 22128.515, -2.8, -13, 0, 0.000030, 2.54, 15542.754, -0.7, 6, 0, 0.000027, 4.43, 7211.762, -0.7, 6, 0, 0.000026, 0.51, 15540.453, 0.9, 31, 0, 0.000026, 1.44, 15545.055, -2.2, -19, 0, 0.000025, 5.37, 7216.364, -3.7, -44, 0], + [0.00001200, 1.041, -2.3012, 1.52, 25, -0.1, 0.00000170, 0.31, -0.711, 0, 0, 0] + ], + SHUO_KB:[1457698.231017, 29.53067166, 1546082.512234, 29.53085106, 1640640.735300, 29.53060000, 1642472.151543, 29.53085439, 1683430.509300, 29.53086148, 1752148.041079, 29.53085097, 1807665.420323, 29.53059851, 1883618.114100, 29.53060000, 1907360.704700, 29.53060000, 1936596.224900, 29.53060000, 1939135.675300, 29.53060000, 1947168.00], + SB:'00000000000000000000000020000002000000000000200000001000000000000000000000000000000000000010002000000000000000200000000200000000000000000000002000000000020000000000000000000000000000000000100000000000010000001000001000000000000000100000000020000000000000002000000000000001000000000000001000000000000100000000010010000020000202001101002020200101000002020010100002000000010100202000001010000202020001010000202020001010000202000001010020202001010000020200101000022000010101002020001010100002020201010100002020200010100002020000010100202000010100000202001010000220200101010020200010101001000000000001001000200000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000020010000000000000000000000000000000000000001000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000010001000000100001001010010101000000000000100001000001000100000000001000000000000100100000000010010100010000000000000000000100011000000000000000000002000000001020000000001001000001000001001000000001000100010010000100001000000100000100100010000000000000010000200000000000000000000000000000000001000000000100100000000000000000000000000000000000000000000000000010000000000101000000000000000000000000000001001010010010100100010000010010000001001001001001000000100100000100010000000100000000000000100000000010100000000001000100010100100000010000000010010000000001000001000000101002000000000100000000000000100001000000010100000101001000000100100100100100000010010010000001001010000000100101001000000000101001000000010101000000000010000001000001000001000000100000000000010010000000000000000010000000100010010000000100000010000010100010010000000000000000001001000000000100101000000010000100110100000000100000000000010000000010000010000100010000000000000000000000010000000000000000100000001000000000001000000000000000100000000000100000010000000100001010000000000101000010100000001001000000010100000000000000000000001000000000001000000000000000000000000000000000000000100000001000000000000100000000000000000000000010000000010010000000001000001010100000001000000000000001000010000101001001010000001000101000000000100100000100110000010010010010001001010010010000001000000000000101000010000000101000000000010000001001001001001000000100101000000010000100010101001010010010000101010010000000101010010000000100010010000010010010000001001010000000100101000100010000000100100001000100100000101010000000000101010100100000100000000000010010000010001001010001000100000001001010000000000000001000100100000100010100001010100000100000000100100100100010010100010001000000010010100000010001010000000001000000000001001010100000001000010100000001001010000101000000010010000100101001000100010100000000010000010000010010001000001000010100000001000000100001000000010000101001001010000001000101000001000100100000100100000010010010010101000000010000000000000010000000001010010010000100010000010010000001001000001001000000100100000100010010100100100001010000100000001010000100000001010100000000100000010000010010010000001001010001000100101000101000010100100000001010100100000001010100000000001000000100000000100100000010010100000000000010001000100000001001000010001001000001010101001000001000101001000100000001000000100100000100010000100010001000000010010100000010000000010001000010001000001000010101000000000010100001000001000100101000100010000000100101000000100010000000000010000010000010010101000000010000101000000010010100001010000010100000001001010000001000101000000000100000000100100101000000000000101000000000100001000010000000100001010010010100000010001010000010001000000001001000000000100000101000010100100000000010100100000001010100100100001000100002000000100002200001010010000000001010001010000101001001000010100001000000010101001000001010001000000000000000100000000100100000001000100010000000010000010000001000000000010101001010000010101000000001000000001000000001001000000000101000100000000100010100000000010000000100010010000010101010010101010100010010001000010010000000001010001000100001000100010000000100100000000100000000000010000101010000010000101010000000000101000010000010100000010001010100000001001000000001000000000000000100000000000100101010000000100001010000100100101000010100000100000000010010000010010001000001010001000000001001001010000100101001000000100001000000010101000001000000000100100000000100010000010100010000001010010000100001001000010000101001000000000101000000000010101001001000000001000000000101000100000010100110000001010110010100001010010000000101010010000000101010010000010000010000000000010001000000101001000000010001000101001000100100100000010000000000101010000100010100010000100010000000010000001010010000000100010001000010001000101001000000100000000000100100000101000100101010100000100100010000100100201001000100010000100000000010010000001001001000001001000100000000001010100000101001010100000001001010010000000101001000100010100100000010010010010010000001000000001000100000001000010100000000000010100101001001010010001000001001000000100100000100000000000010100010001001010010010100001000010000000001000010000100101010010010010000001001001001001000000000101000100000010100100101001010100000000001010010000000001010000000000101000010010010000010000000001010001000000101001000010010001000101001000100100000001010100100000101010100100000100000100000010010100010000001000010000000100010001010010001001000001000001001000001010100001000101000101001000100000000100010010100100000001000100010100100000000010010000001000001000001001010101000001000010101000001001010100101001001010010001000101001000000000100100000010010010000010010001000000010010100000000010010100001000010010100101010001010010000000001001001001100100100100100000010010100010101000010010000100000000010000000001010000010100100010010010010000011001001001000000000100101000100010010100100101000010000100000000010100100000001010100100100100000000010010010000000001001010001000100101001001010010101000000000010100001000001010100001000001000000000000100100100000010010100010001001000010000100100010001010010001001000000010101001000001010001001000001000001001000100101000100010010000100001001000100010100100000010010010000010010001010001000010101010000010010001001000001000100101001000010010001000101001000000100100100000100000010000010010101000000010000101000000000000101001010010010100100010001010010000001001001001001100000100100100100010000000100101000000000100001000010100100101001000100010100100000010010010010011001001001001001000100101000001010000100100000000000100000000000010100000001001000000100100100100110010010010200000001001010001000100101001001010000101001000000010101001000000010001001001001000001000000100100000000010010100010001001010010010100101010000000010101000010000010101000010000010000000000001001000000000100101000100010010000100101001000100010100100010010000010101010010100010100010010000010000010010001001010001000100100001000010010001000101001000100100000100000100100010000010100101010000000100101010010100010001001000010010100100010001010010000001000001000001000000100000100101010100000100001010000100000001010010100100101001000100010100100000010010010010011000001001001001010100000001001010000000001000010000101001001010010001000101001000000100100100100110010010010010010001001010010010100101000000000000101000010000000101000000010010000001001001001001100100100100000000010010100010101001010010010000101010010000000101010010000000100010010000010010010000001001010000000100101000100010010000100101001000100100000101010000100000101010100100000100000000000010010000010001001010001000100100001001010010001000100001000100100100100010100001010100000100101010100100100100010010100010001001000010010100100010001010010001001000001000001001010100000001001010100000001001010000101002001010010000100101001000100010100100000010000010010010000001000001001010100000001000010000001000000010100101001001010010001000101001001000100100100100110000010010010010101001010010000100001000010000100001010010010020000000000000000020001000000000000000000000002000000000000000000000000000000100000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000110000000000000000000000000000000000000000000000000000000000020000000000000000000002000000000000002000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000200000000000000000000000002000000000000000000000000000000000020000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000001000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000010000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000100000000000000000200000000000000000000000002000000000000000000000000000000000020000000200000000000000000000000000002000000000000200000000000020000000000000000000000000000000000000000000000000000000000000000000000000000020000000002000000000200000000000000000000000000000000000000000000000000000000001000000000000000000200000000000000000000000000000000200000000000000000000000000000000100000000000000000000000000000000000000000200000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000002020000000000000000000000000000000000000000000100000200000000000000000000000002000000000200000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000001000000000000000000000000002000000000000002000000000002000000000000000000000000200200000000000000000000000000000000000001000000000000000000000000000000000000000000000002000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000200000000000000000000000100000010100000000000000000000000100000000200000000000000000000020000000000000000000000200000000000000000000000000000000000000000200000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000002000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000200000000000000000000000000010000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000020000000000000020000000000000000000000000000000000000000100000000001000000000000000000000000000000000200000000000200000000000000000000000000000000000000000000000000000000002000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000100000020000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000010000000000000010000002000000000002000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000001000000002000000000000002000000000000000000000000000000000000000000000000000000220000000010000020000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000201000020000000200000000000000000000000001000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000001000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000200010000000000000000000000000000000000100000000000000100000000000000000000000000000000000000000002000100000000000000000000000000010000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000002000000000000000100000000000000000000000000000000000000000200000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000200000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000002000000000000000000000000000000000020000020000000000000020000000000000000000000000000200000000000020000000000000000000000000000000000000000000001000000000000000000000000000000020000000000000000000200000000000000000000000000000000000000000000010000000000000000000000000000000200000020000000000000000000000000200000000000000000000000000000000000000000000000002000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000100000000000000000020000000000002000000000000002000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000020000000000000001000000000000000000000000000000000000000002000000000002000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000200000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000020000000000000001000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000100000000000000000000000000000000000000000000000', + nutationLon2:function(t){ + var a = -1.742 * t; + var t2 = t * t; + var dl = 0; + for (var i = 0, j = this.NUT_B.length; i < j; i += 5) { + dl += (this.NUT_B[i + 3] + a) * Math.sin(this.NUT_B[i] + this.NUT_B[i + 1] * t + this.NUT_B[i + 2] * t2); + a = 0; + } + return dl / 100 / this.SECOND_PER_RAD; + }, + eLon:function(t,n){ + t /= 10; + var v = 0; + var tn = 1; + var n1; + var n2; + var m; + var c; + var pn = 1; + var n0; + var m0 = this.XL0[pn + 1] - this.XL0[pn]; + for (var i = 0; i < 6; i++, tn *= t) { + n1 = Math.floor(this.XL0[pn + i]); + n2 = Math.floor(this.XL0[pn + 1 + i]); + n0 = n2 - n1; + if (n0 === 0) { + continue; + } + if (n < 0) { + m = n2; + } else { + m = Math.floor((3 * n * n0 / m0 + 0.5) + n1); + if (i != 0) { + m += 3; + } + if (m > n2) { + m = n2; + } + } + c = 0; + for (var j = n1; j < m; j += 3) { + c += this.XL0[j] * Math.cos(this.XL0[j + 1] + t * this.XL0[j + 2]); + } + v += c * tn; + } + v /= this.XL0[0]; + var t2 = t * t; + v += (-0.0728 - 2.7702 * t - 1.1019 * t2 - 0.0996 * t2 * t) / this.SECOND_PER_RAD; + return v; + }, + mLon:function(t,n){ + var ob = this.XL1; + var obl = ob[0].length; + var tn = 1; + var v = 0; + var j; + var c; + var t2 = t * t; + var t3 = t2 * t; + var t4 = t3 * t; + var t5 = t4 * t; + var tx = t - 10; + v += (3.81034409 + 8399.684730072 * t - 3.319e-05 * t2 + 3.11e-08 * t3 - 2.033e-10 * t4) * this.SECOND_PER_RAD; + v += 5028.792262 * t + 1.1124406 * t2 + 0.00007699 * t3 - 0.000023479 * t4 - 0.0000000178 * t5; + if (tx > 0) { + v += -0.866 + 1.43 * tx + 0.054 * tx * tx; + } + t2 /= 1e4; + t3 /= 1e8; + t4 /= 1e8; + + n *= 6; + if (n < 0) { + n = obl; + } + for (var i = 0, x = ob.length; i < x; i++, tn *= t) { + var f = ob[i]; + var l = f.length; + var m = Math.floor((n * l / obl + 0.5)); + if (i > 0) { + m += 6; + } + if (m >= l) { + m = l; + } + for (j = 0, c = 0; j < m; j += 6) { + c += f[j] * Math.cos(f[j + 1] + t * f[j + 2] + t2 * f[j + 3] + t3 * f[j + 4] + t4 * f[j + 5]); + } + v += c * tn; + } + v /= this.SECOND_PER_RAD; + return v; + }, + gxcSunLon:function(t){ + var t2 = t * t; + var v = -0.043126 + 628.301955 * t - 0.000002732 * t2; + var e = 0.016708634 - 0.000042037 * t - 0.0000001267 * t2; + return -20.49552 * (1 + e * Math.cos(v)) / this.SECOND_PER_RAD; + }, + ev:function(t){ + var f = 628.307585 * t; + return 628.332 + 21 * Math.sin(1.527 + f) + 0.44 * Math.sin(1.48 + f * 2) + 0.129 * Math.sin(5.82 + f) * t + 0.00055 * Math.sin(4.21 + f) * t * t; + }, + saLon:function(t,n){ + return this.eLon(t, n) + this.nutationLon2(t) + this.gxcSunLon(t) + Math.PI; + }, + dtExt:function(y,jsd){ + var dy = (y - 1820) / 100; + return -20 + jsd * dy * dy; + }, + dtCalc:function(y){ + var size = this.DT_AT.length; + var y0 = this.DT_AT[size - 2]; + var t0 = this.DT_AT[size - 1]; + if (y >= y0) { + var jsd = 31; + if (y > y0 + 100) { + return this.dtExt(y, jsd); + } + return this.dtExt(y, jsd) - (this.dtExt(y0, jsd) - t0) * (y0 + 100 - y) / 100; + } + var i; + for (i = 0; i < size; i += 5) { + if (y < this.DT_AT[i + 5]) { + break; + } + } + var t1 = (y - this.DT_AT[i]) / (this.DT_AT[i + 5] - this.DT_AT[i]) * 10; + var t2 = t1 * t1; + var t3 = t2 * t1; + return this.DT_AT[i + 1] + this.DT_AT[i + 2] * t1 + this.DT_AT[i + 3] * t2 + this.DT_AT[i + 4] * t3; + }, + dtT:function(t){ + return this.dtCalc(t / 365.2425 + 2000) / this.SECOND_PER_DAY; + }, + mv:function(t){ + var v = 8399.71 - 914 * Math.sin(0.7848 + 8328.691425 * t + 0.0001523 * t * t); + v -= 179 * Math.sin(2.543 + 15542.7543 * t) + 160 * Math.sin(0.1874 + 7214.0629 * t) + 62 * Math.sin(3.14 + 16657.3828 * t) + 34 * Math.sin(4.827 + 16866.9323 * t) + 22 * Math.sin(4.9 + 23871.4457 * t) + 12 * Math.sin(2.59 + 14914.4523 * t) + 7 * Math.sin(0.23 + 6585.7609 * t) + 5 * Math.sin(0.9 + 25195.624 * t) + 5 * Math.sin(2.32 - 7700.3895 * t) + 5 * Math.sin(3.88 + 8956.9934 * t) + 5 * Math.sin(0.49 + 7771.3771 * t); + return v; + }, + saLonT:function(w){ + var t; + var v = 628.3319653318; + t = (w - 1.75347 - Math.PI) / v; + v = this.ev(t); + t += (w - this.saLon(t, 10)) / v; + v = this.ev(t); + t += (w - this.saLon(t, -1)) / v; + return t; + }, + msaLon:function(t,mn,sn){ + return this.mLon(t, mn) + (-3.4E-6) - (this.eLon(t, sn) + this.gxcSunLon(t) + Math.PI); + }, + msaLonT:function(w){ + var t; + var v = 7771.37714500204; + t = (w + 1.08472) / v; + t += (w - this.msaLon(t, 3, 3)) / v; + v = this.mv(t) - this.ev(t); + t += (w - this.msaLon(t, 20, 10)) / v; + t += (w - this.msaLon(t, -1, 60)) / v; + return t; + }, + msaLonT2:function(w){ + var t; + var l; + var v = 7771.37714500204; + t = (w + 1.08472) / v; + var t2 = t * t; + t -= (-0.00003309 * t2 + 0.10976 * Math.cos(0.784758 + 8328.6914246 * t + 0.000152292 * t2) + 0.02224 * Math.cos(0.18740 + 7214.0628654 * t - 0.00021848 * t2) - 0.03342 * Math.cos(4.669257 + 628.307585 * t)) / v; + t2 = t * t; + l = this.mLon(t, 20) - (4.8950632 + 628.3319653318 * t + 0.000005297 * t2 + 0.0334166 * Math.cos(4.669257 + 628.307585 * t) + 0.0002061 * Math.cos(2.67823 + 628.307585 * t) * t + 0.000349 * Math.cos(4.6261 + 1256.61517 * t) - 20.5 / this.SECOND_PER_RAD); + v = 7771.38 - 914 * Math.sin(0.7848 + 8328.691425 * t + 0.0001523 * t2) - 179 * Math.sin(2.543 + 15542.7543 * t) - 160 * Math.sin(0.1874 + 7214.0629 * t); + t += (w - l) / v; + return t; + }, + shuoHigh:function(w){ + var t = this.msaLonT2(w) * 36525; + t = t - this.dtT(t) + this.ONE_THIRD; + var v = ((t + 0.5) % 1) * this.SECOND_PER_DAY; + if (v < 1800 || v > this.SECOND_PER_DAY - 1800) { + t = this.msaLonT(w) * 36525 - this.dtT(t) + this.ONE_THIRD; + } + return t; + }, + shuoLow:function(w){ + var v = 7771.37714500204; + var t = (w + 1.08472) / v; + t -= (-0.0000331 * t * t + 0.10976 * Math.cos(0.785 + 8328.6914 * t) + 0.02224 * Math.cos(0.187 + 7214.0629 * t) - 0.03342 * Math.cos(4.669 + 628.3076 * t)) / v + (32 * (t + 1.8) * (t + 1.8) - 20) / this.SECOND_PER_DAY / 36525; + return t * 36525 + this.ONE_THIRD; + }, + calcShuo:function(jd){ + var size = this.SHUO_KB.length; + var d = 0; + var pc = 14; + var i; + jd += Solar.J2000; + var f1 = this.SHUO_KB[0] - pc, f2 = this.SHUO_KB[size - 1] - pc, f3 = 2436935; + if (jd < f1 || jd >= f3) { + d = Math.floor(this.shuoHigh(Math.floor((jd + pc - 2451551) / 29.5306) * Math.PI * 2) + 0.5); + } else if (jd >= f1 && jd < f2) { + for (i = 0; i < size; i += 2) { + if (jd + pc < this.SHUO_KB[i + 2]) { + break; + } + } + d = this.SHUO_KB[i] + this.SHUO_KB[i + 1] * Math.floor((jd + pc - this.SHUO_KB[i]) / this.SHUO_KB[i + 1]); + d = Math.floor(d + 0.5); + if (d === 1683460) { + d++; + } + d -= Solar.J2000; + } else if (jd >= f2 && jd < f3) { + d = Math.floor(this.shuoLow(Math.floor((jd + pc - 2451551) / 29.5306) * Math.PI * 2) + 0.5); + var from = Math.floor((jd - f2) / 29.5306); + var n = this.SB.substr(from, 1); + if ('1' == n) { + d += 1; + } else if ('2' == n) { + d -= 1; + } + } + return d; + } + }; + })(); + var SolarUtil = (function(){ + return { + WEEK:['日','一','二','三','四','五','六'], + DAYS_OF_MONTH:[31,28,31,30,31,30,31,31,30,31,30,31], + XINGZUO:['白羊','金牛','双子','巨蟹','狮子','处女','天秤','天蝎','射手','摩羯','水瓶','双鱼'], + FESTIVAL:{'1-1':'元旦节','2-14':'情人节','3-8':'妇女节','3-12':'植树节','3-15':'消费者权益日','4-1':'愚人节','5-1':'劳动节','5-4':'青年节','6-1':'儿童节','7-1':'建党节','8-1':'建军节','9-10':'教师节','10-1':'国庆节','12-24':'平安夜','12-25':'圣诞节'}, + OTHER_FESTIVAL:{'1-8':['周恩来逝世纪念日'],'1-10':['中国人民警察节','中国公安110宣传日'],'1-21':['列宁逝世纪念日'],'1-26':['国际海关日'],'2-2':['世界湿地日'],'2-4':['世界抗癌日'],'2-7':['京汉铁路罢工纪念'],'2-10':['国际气象节'],'2-19':['邓小平逝世纪念日'],'2-21':['国际母语日'],'2-24':['第三世界青年日'],'3-1':['国际海豹日'],'3-3':['全国爱耳日'],'3-5':['周恩来诞辰纪念日','中国青年志愿者服务日'],'3-6':['世界青光眼日'],'3-12':['孙中山逝世纪念日'],'3-14':['马克思逝世纪念日'],'3-17':['国际航海日'],'3-18':['全国科技人才活动日'],'3-21':['世界森林日','世界睡眠日'],'3-22':['世界水日'],'3-23':['世界气象日'],'3-24':['世界防治结核病日'],'4-2':['国际儿童图书日'],'4-7':['世界卫生日'],'4-22':['列宁诞辰纪念日'],'4-23':['世界图书和版权日'],'4-26':['世界知识产权日'],'5-3':['世界新闻自由日'],'5-5':['马克思诞辰纪念日'],'5-8':['世界红十字日'],'5-11':['世界肥胖日'],'5-27':['上海解放日'],'5-31':['世界无烟日'],'6-5':['世界环境日'],'6-6':['全国爱眼日'],'6-8':['世界海洋日'],'6-11':['中国人口日'],'6-14':['世界献血日'],'7-1':['香港回归纪念日'],'7-7':['中国人民抗日战争纪念日'],'7-11':['世界人口日'],'8-5':['恩格斯逝世纪念日'],'8-6':['国际电影节'],'8-12':['国际青年日'],'8-22':['邓小平诞辰纪念日'],'9-3':['中国抗日战争胜利纪念日'],'9-8':['世界扫盲日'],'9-9':['毛泽东逝世纪念日'],'9-14':['世界清洁地球日'],'9-18':['九一八事变纪念日'],'9-20':['全国爱牙日'],'9-21':['国际和平日'],'9-27':['世界旅游日'],'10-4':['世界动物日'],'10-10':['辛亥革命纪念日'],'10-13':['中国少年先锋队诞辰日'],'10-25':['抗美援朝纪念日'],'11-12':['孙中山诞辰纪念日'],'11-17':['国际大学生节'],'11-28':['恩格斯诞辰纪念日'],'12-1':['世界艾滋病日'],'12-12':['西安事变纪念日'],'12-13':['国家公祭日'],'12-26':['毛泽东诞辰纪念日']}, + WEEK_FESTIVAL:{'5-2-0':'母亲节','6-3-0':'父亲节','11-4-4':'感恩节'}, + isLeapYear:function(year){return (year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0);}, + getDaysOfMonth:function(year,month){ + var m = month-1; + var d = this.DAYS_OF_MONTH[m]; + if(m===1&&this.isLeapYear(year)){ + d++; + } + return d; + }, + getDaysOfYear:function(year){ + return this.isLeapYear(year) ? 366: 365; + }, + getDaysInYear:function(year, month, day){ + var days = 0; + for (var i = 1; i < month; i++) { + days += this.getDaysOfMonth(year, i); + } + days += day; + if (1582 === year && 10 === month && day >= 15) { + days -= 10; + } + return days; + }, + getWeeksOfMonth:function(year,month,start){ + var days = this.getDaysOfMonth(year,month); + var firstDate = ExactDate.fromYmd(year,month,1); + var firstDayWeek = firstDate.getDay(); + return Math.ceil((days+firstDayWeek-start)/7); + } + }; + })(); + var LunarUtil = (function(){ + return { + BASE_MONTH_ZHI_INDEX:2, + XUN:['甲子','甲戌','甲申','甲午','甲辰','甲寅'], + XUN_KONG:['戌亥','申酉','午未','辰巳','寅卯','子丑'], + LIU_YAO:['先胜','友引','先负','佛灭','大安','赤口'], + HOU:['初候','二候','三候'], + WU_HOU:['蚯蚓结','麋角解','水泉动','雁北乡','鹊始巢','雉始雊','鸡始乳','征鸟厉疾','水泽腹坚','东风解冻','蛰虫始振','鱼陟负冰','獭祭鱼','候雁北','草木萌动','桃始华','仓庚鸣','鹰化为鸠','玄鸟至','雷乃发声','始电','桐始华','田鼠化为鴽','虹始见','萍始生','鸣鸠拂奇羽','戴胜降于桑','蝼蝈鸣','蚯蚓出','王瓜生','苦菜秀','靡草死','麦秋至','螳螂生','鵙始鸣','反舌无声','鹿角解','蜩始鸣','半夏生','温风至','蟋蟀居壁','鹰始挚','腐草为萤','土润溽暑','大雨行时','凉风至','白露降','寒蝉鸣','鹰乃祭鸟','天地始肃','禾乃登','鸿雁来','玄鸟归','群鸟养羞','雷始收声','蛰虫坯户','水始涸','鸿雁来宾','雀入大水为蛤','菊有黄花','豺乃祭兽','草木黄落','蛰虫咸俯','水始冰','地始冻','雉入大水为蜃','虹藏不见','天气上升地气下降','闭塞而成冬','鹖鴠不鸣','虎始交','荔挺出'], + GAN:['','甲','乙','丙','丁','戊','己','庚','辛','壬','癸'], + POSITION_XI:['','艮','乾','坤','离','巽','艮','乾','坤','离','巽'], + POSITION_YANG_GUI:['','坤','坤','兑','乾','艮','坎','离','艮','震','巽'], + POSITION_YIN_GUI:['','艮','坎','乾','兑','坤','坤','艮','离','巽','震'], + POSITION_FU:['','巽','巽','震','震','坎','离','坤','坤','乾','兑'], + POSITION_FU_2:['','坎','坤','乾','巽','艮','坎','坤','乾','巽','艮'], + POSITION_CAI:['','艮','艮','坤','坤','坎','坎','震','震','离','离'], + POSITION_TAI_SUI_YEAR: ['坎','艮','艮','震','巽','巽','离','坤','坤','兑','坎','坎'], + POSITION_GAN: ['震','震','离','离','中','中','兑','兑','坎','坎'], + POSITION_ZHI: ['坎','中','震','震','中','离','离','中','兑','兑','中','坎'], + POSITION_TAI_DAY:['占门碓 外东南','碓磨厕 外东南','厨灶炉 外正南','仓库门 外正南','房床栖 外正南','占门床 外正南','占碓磨 外正南','厕灶厨 外西南','仓库炉 外西南','房床门 外西南','门碓栖 外西南','碓磨床 外西南','厨灶碓 外西南','仓库厕 外正西','房床炉 外正西','占大门 外正西','碓磨栖 外正西','厨房床 外正西','仓库碓 外西北','房床厕 外西北','占门炉 外西北','门碓磨 外西北','厨灶栖 外西北','仓库床 外西北','房床碓 外正北','占门厕 外正北','碓磨炉 外正北','厨灶门 外正北','仓库栖 外正北','占房床 房内北','占门碓 房内北','碓磨厕 房内北','厨灶炉 房内北','门仓库 房内北','床房栖 房内中','占门床 房内中','占碓磨 房内南','厨磨厕 房内南','仓库炉 房内南','房床门 房内西','门碓栖 房内东','碓磨床 房内东','厨灶碓 房内东','仓库厕 房内东','房床炉 房内中','占大门 外东北','碓磨栖 外东北','厨灶床 外东北','仓库碓 外东北','房床厕 外东北','占门炉 外东北','门碓磨 外正东','厨灶栖 外正东','仓库床 外正东','房床碓 外正东','占门厕 外正东','碓磨炉 外东南','厨灶门 外东南','仓库栖 外东南','占房床 外东南'], + POSITION_TAI_MONTH:['占房床','占户窗','占门堂','占厨灶','占房床','占床仓','占碓磨','占厕户','占门房','占房床','占灶炉','占房床'], + ZHI:['','子','丑','寅','卯','辰','巳','午','未','申','酉','戌','亥'], + ZHI_XING:['','建','除','满','平','定','执','破','危','成','收','开','闭'], + JIA_ZI:['甲子','乙丑','丙寅','丁卯','戊辰','己巳','庚午','辛未','壬申','癸酉','甲戌','乙亥','丙子','丁丑','戊寅','己卯','庚辰','辛巳','壬午','癸未','甲申','乙酉','丙戌','丁亥','戊子','己丑','庚寅','辛卯','壬辰','癸巳','甲午','乙未','丙申','丁酉','戊戌','己亥','庚子','辛丑','壬寅','癸卯','甲辰','乙巳','丙午','丁未','戊申','己酉','庚戌','辛亥','壬子','癸丑','甲寅','乙卯','丙辰','丁巳','戊午','己未','庚申','辛酉','壬戌','癸亥'], + TIAN_SHEN:['','青龙','明堂','天刑','朱雀','金匮','天德','白虎','玉堂','天牢','玄武','司命','勾陈'], + ZHI_TIAN_SHEN_OFFSET:{'子':4,'丑':2,'寅':0,'卯':10,'辰':8,'巳':6,'午':4,'未':2,'申':0,'酉':10,'戌':8,'亥':6}, + TIAN_SHEN_TYPE:{'青龙':'黄道','明堂':'黄道','金匮':'黄道','天德':'黄道','玉堂':'黄道','司命':'黄道','天刑':'黑道','朱雀':'黑道','白虎':'黑道','天牢':'黑道','玄武':'黑道','勾陈':'黑道'}, + TIAN_SHEN_TYPE_LUCK:{'黄道':'吉','黑道':'凶'}, + PENGZU_GAN:['','甲不开仓财物耗散','乙不栽植千株不长','丙不修灶必见灾殃','丁不剃头头必生疮','戊不受田田主不祥','己不破券二比并亡','庚不经络织机虚张','辛不合酱主人不尝','壬不泱水更难提防','癸不词讼理弱敌强'], + PENGZU_ZHI:['','子不问卜自惹祸殃','丑不冠带主不还乡','寅不祭祀神鬼不尝','卯不穿井水泉不香','辰不哭泣必主重丧','巳不远行财物伏藏','午不苫盖屋主更张','未不服药毒气入肠','申不安床鬼祟入房','酉不会客醉坐颠狂','戌不吃犬作怪上床','亥不嫁娶不利新郎'], + NUMBER:['〇','一','二','三','四','五','六','七','八','九','十','十一','十二'], + MONTH:['','正','二','三','四','五','六','七','八','九','十','冬','腊'], + SEASON:['','孟春','仲春','季春','孟夏','仲夏','季夏','孟秋','仲秋','季秋','孟冬','仲冬','季冬'], + SHENGXIAO:['','鼠','牛','虎','兔','龙','蛇','马','羊','猴','鸡','狗','猪'], + DAY:['','初一','初二','初三','初四','初五','初六','初七','初八','初九','初十','十一','十二','十三','十四','十五','十六','十七','十八','十九','二十','廿一','廿二','廿三','廿四','廿五','廿六','廿七','廿八','廿九','三十'], + YUE_XIANG:['','朔','既朔','蛾眉新','蛾眉新','蛾眉','夕月','上弦','上弦','九夜','宵','宵','宵','渐盈凸','小望','望','既望','立待','居待','寝待','更待','渐亏凸','下弦','下弦','有明','有明','蛾眉残','蛾眉残','残','晓','晦'], + XIU:{'申1':'毕','申2':'翼','申3':'箕','申4':'奎','申5':'鬼','申6':'氐','申0':'虚','子1':'毕','子2':'翼','子3':'箕','子4':'奎','子5':'鬼','子6':'氐','子0':'虚','辰1':'毕','辰2':'翼','辰3':'箕','辰4':'奎','辰5':'鬼','辰6':'氐','辰0':'虚','巳1':'危','巳2':'觜','巳3':'轸','巳4':'斗','巳5':'娄','巳6':'柳','巳0':'房','酉1':'危','酉2':'觜','酉3':'轸','酉4':'斗','酉5':'娄','酉6':'柳','酉0':'房','丑1':'危','丑2':'觜','丑3':'轸','丑4':'斗','丑5':'娄','丑6':'柳','丑0':'房','寅1':'心','寅2':'室','寅3':'参','寅4':'角','寅5':'牛','寅6':'胃','寅0':'星','午1':'心','午2':'室','午3':'参','午4':'角','午5':'牛','午6':'胃','午0':'星','戌1':'心','戌2':'室','戌3':'参','戌4':'角','戌5':'牛','戌6':'胃','戌0':'星','亥1':'张','亥2':'尾','亥3':'壁','亥4':'井','亥5':'亢','亥6':'女','亥0':'昴','卯1':'张','卯2':'尾','卯3':'壁','卯4':'井','卯5':'亢','卯6':'女','卯0':'昴','未1':'张','未2':'尾','未3':'壁','未4':'井','未5':'亢','未6':'女','未0':'昴'}, + XIU_LUCK:{'角':'吉','亢':'凶','氐':'凶','房':'吉','心':'凶','尾':'吉','箕':'吉','斗':'吉','牛':'凶','女':'凶','虚':'凶','危':'凶','室':'吉','壁':'吉','奎':'凶','娄':'吉','胃':'吉','昴':'凶','毕':'吉','觜':'凶','参':'吉','井':'吉','鬼':'凶','柳':'凶','星':'凶','张':'吉','翼':'凶','轸':'吉'}, + XIU_SONG:{'角':'角星造作主荣昌,外进田财及女郎,嫁娶婚姻出贵子,文人及第见君王,惟有埋葬不可用,三年之后主瘟疫,起工修筑坟基地,堂前立见主人凶。','亢':'亢星造作长房当,十日之中主有殃,田地消磨官失职,接运定是虎狼伤,嫁娶婚姻用此日,儿孙新妇守空房,埋葬若还用此日,当时害祸主重伤。','氐':'氐星造作主灾凶,费尽田园仓库空,埋葬不可用此日,悬绳吊颈祸重重,若是婚姻离别散,夜招浪子入房中,行船必定遭沉没,更生聋哑子孙穷。','房':'房星造作田园进,钱财牛马遍山岗,更招外处田庄宅,荣华富贵福禄康,埋葬若然用此日,高官进职拜君王,嫁娶嫦娥至月殿,三年抱子至朝堂。','心':'心星造作大为凶,更遭刑讼狱囚中,忤逆官非宅产退,埋葬卒暴死相从,婚姻若是用此日,子死儿亡泪满胸,三年之内连遭祸,事事教君没始终。','尾':'尾星造作主天恩,富贵荣华福禄增,招财进宝兴家宅,和合婚姻贵子孙,埋葬若能依此日,男清女正子孙兴,开门放水招田宅,代代公侯远播名。','箕':'箕星造作主高强,岁岁年年大吉昌,埋葬修坟大吉利,田蚕牛马遍山岗,开门放水招田宅,箧满金银谷满仓,福荫高官加禄位,六亲丰禄乐安康。','斗':'斗星造作主招财,文武官员位鼎台,田宅家财千万进,坟堂修筑贵富来,开门放水招牛马,旺蚕男女主和谐,遇此吉宿来照护,时支福庆永无灾。','牛':'牛星造作主灾危,九横三灾不可推,家宅不安人口退,田蚕不利主人衰,嫁娶婚姻皆自损,金银财谷渐无之,若是开门并放水,牛猪羊马亦伤悲。','女':'女星造作损婆娘,兄弟相嫌似虎狼,埋葬生灾逢鬼怪,颠邪疾病主瘟惶,为事遭官财失散,泻利留连不可当,开门放水用此日,全家财散主离乡。','虚':'虚星造作主灾殃,男女孤眠不一双,内乱风声无礼节,儿孙媳妇伴人床,开门放水遭灾祸,虎咬蛇伤又卒亡,三三五五连年病,家破人亡不可当。','危':'危星不可造高楼,自遭刑吊见血光,三年孩子遭水厄,后生出外永不还,埋葬若还逢此日,周年百日取高堂,三年两载一悲伤,开门放水到官堂。','室':'室星修造进田牛,儿孙代代近王侯,家贵荣华天上至,寿如彭祖八千秋,开门放水招财帛,和合婚姻生贵儿,埋葬若能依此日,门庭兴旺福无休。','壁':'壁星造作主增财,丝蚕大熟福滔天,奴婢自来人口进,开门放水出英贤,埋葬招财官品进,家中诸事乐陶然,婚姻吉利主贵子,早播名誉著祖鞭。','奎':'奎星造作得祯祥,家内荣和大吉昌,若是埋葬阴卒死,当年定主两三伤,看看军令刑伤到,重重官事主瘟惶,开门放水遭灾祸,三年两次损儿郎。','娄':'娄星修造起门庭,财旺家和事事兴,外进钱财百日进,一家兄弟播高名,婚姻进益生贵子,玉帛金银箱满盈,放水开门皆吉利,男荣女贵寿康宁。','胃':'胃星造作事如何,家贵荣华喜气多,埋葬贵临官禄位,夫妇齐眉永保康,婚姻遇此家富贵,三灾九祸不逢他,从此门前多吉庆,儿孙代代拜金阶。','昴':'昴星造作进田牛,埋葬官灾不得休,重丧二日三人死,尽卖田园不记增,开门放水招灾祸,三岁孩儿白了头,婚姻不可逢此日,死别生离是可愁。','毕':'毕星造作主光前,买得田园有余钱,埋葬此日添官职,田蚕大熟永丰年,开门放水多吉庆,合家人口得安然,婚姻若得逢此日,生得孩儿福寿全。','觜':'觜星造作有徒刑,三年必定主伶丁,埋葬卒死多因此,取定寅年使杀人,三丧不止皆由此,一人药毒二人身,家门田地皆退败,仓库金银化作尘。','参':'参星造作旺人家,文星照耀大光华,只因造作田财旺,埋葬招疾哭黄沙,开门放水加官职,房房子孙见田加,婚姻许遁遭刑克,男女朝开幕落花。','井':'井星造作旺蚕田,金榜题名第一光,埋葬须防惊卒死,狂颠风疾入黄泉,开门放水招财帛,牛马猪羊旺莫言,贵人田塘来入宅,儿孙兴旺有余钱。','鬼':'鬼星起造卒人亡,堂前不见主人郎,埋葬此日官禄至,儿孙代代近君王,开门放水须伤死,嫁娶夫妻不久长,修土筑墙伤产女,手扶双女泪汪汪。','柳':'柳星造作主遭官,昼夜偷闭不暂安,埋葬瘟惶多疾病,田园退尽守冬寒,开门放水遭聋瞎,腰驼背曲似弓弯,更有棒刑宜谨慎,妇人随客走盘桓。','星':'星宿日好造新房,进职加官近帝王,不可埋葬并放水,凶星临位女人亡,生离死别无心恋,要自归休别嫁郎,孔子九曲殊难度,放水开门天命伤。','张':'张星日好造龙轩,年年并见进庄田,埋葬不久升官职,代代为官近帝前,开门放水招财帛,婚姻和合福绵绵,田蚕人满仓库满,百般顺意自安然。','翼':'翼星不利架高堂,三年二载见瘟惶,埋葬若还逢此日,子孙必定走他乡,婚姻此日不宜利,归家定是不相当,开门放水家须破,少女恋花贪外郎。','轸':'轸星临水造龙宫,代代为官受皇封,富贵荣华增寿禄,库满仓盈自昌隆,埋葬文昌来照助,宅舍安宁不见凶,更有为官沾帝宠,婚姻龙子入龙宫。'}, + ZHENG:{'角':'木','井':'木','奎':'木','斗':'木','亢':'金','鬼':'金','娄':'金','牛':'金','氐':'土','柳':'土','胃':'土','女':'土','房':'日','星':'日','昴':'日','虚':'日','心':'月','张':'月','毕':'月','危':'月','尾':'火','翼':'火','觜':'火','室':'火','箕':'水','轸':'水','参':'水','壁':'水' }, + ANIMAL:{'角':'蛟','斗':'獬','奎':'狼','井':'犴','亢':'龙','牛':'牛','娄':'狗','鬼':'羊','女':'蝠','氐':'貉','胃':'彘','柳':'獐','房':'兔','虚':'鼠','昴':'鸡','星':'马','心':'狐','危':'燕','毕':'乌','张':'鹿','尾':'虎','室':'猪','觜':'猴','翼':'蛇','箕':'豹','壁':'獝','参':'猿','轸':'蚓' }, + GONG:{'角':'东','井':'南','奎':'西','斗':'北','亢':'东','鬼':'南','娄':'西','牛':'北','氐':'东','柳':'南','胃':'西','女':'北','房':'东','星':'南','昴':'西','虚':'北','心':'东','张':'南','毕':'西','危':'北','尾':'东','翼':'南','觜':'西','室':'北','箕':'东','轸':'南','参':'西','壁':'北' }, + SHOU:{'东':'青龙','南':'朱雀','西':'白虎','北':'玄武'}, + FESTIVAL:{'1-1':'春节','1-15':'元宵节','2-2':'龙头节','5-5':'端午节','7-7':'七夕节','8-15':'中秋节','9-9':'重阳节','12-8':'腊八节'}, + OTHER_FESTIVAL:{'1-4':['接神日'],'1-5':['隔开日'],'1-7':['人日'],'1-8':['谷日','顺星节'],'1-9':['天日'],'1-10':['地日'],'1-20':['天穿节'],'1-25':['填仓节'],'1-30':['正月晦'],'2-1':['中和节'],'2-2':['春社'],'3-3':['上巳节'],'5-20':['分龙节'],'5-25':['会龙节'],'6-6':['天贶节'],'6-24':['观莲节'],'6-25':['五谷母节'],'7-14':['中元节'],'7-22':['财神节'],'7-29':['地藏节'],'8-1':['天灸日'],'10-1':['寒衣节'],'10-10':['十成节'],'10-15':['下元节'],'12-7':['驱傩日'],'12-16':['尾牙'],'12-24':['祭灶日']}, + CHONG:{'子':'午','丑':'未','寅':'申','卯':'酉','辰':'戌','巳':'亥','午':'子','未':'丑','申':'寅','酉':'卯','戌':'辰','亥':'巳'}, + CHONG_GAN:{'甲':'戊','乙':'己','丙':'庚','丁':'辛','戊':'壬','己':'癸','庚':'甲','辛':'乙','壬':'丙','癸':'丁'}, + CHONG_GAN_BAD:{'庚':'甲','辛':'乙','壬':'丙','癸':'丁'}, + CHONG_GAN_TIE:{'甲':'己','乙':'戊','丙':'辛','丁':'庚','戊':'癸','己':'壬','庚':'乙','辛':'甲','壬':'丁','癸':'丙'}, + CHONG_GAN_TIE_GOOD:{'甲':'己','丙':'辛','戊':'癸','庚':'乙','壬':'丁'}, + SHA:{'子':'南','丑':'东','寅':'北','卯':'西','辰':'南','巳':'东','午':'北','未':'西','申':'南','酉':'东','戌':'北','亥':'西'}, + POSITION_DESC:{'坎':'正北','艮':'东北','震':'正东','巽':'东南','离':'正南','坤':'西南','兑':'正西','乾':'西北','中':'中宫'}, + NAYIN:{'甲子':'海中金','甲午':'沙中金','丙寅':'炉中火','丙申':'山下火','戊辰':'大林木','戊戌':'平地木','庚午':'路旁土','庚子':'壁上土','壬申':'剑锋金','壬寅':'金箔金','甲戌':'山头火','甲辰':'覆灯火','丙子':'涧下水','丙午':'天河水','戊寅':'城头土','戊申':'大驿土','庚辰':'白蜡金','庚戌':'钗钏金','壬午':'杨柳木','壬子':'桑柘木','甲申':'泉中水','甲寅':'大溪水','丙戌':'屋上土','丙辰':'沙中土','戊子':'霹雳火','戊午':'天上火','庚寅':'松柏木','庚申':'石榴木','壬辰':'长流水','壬戌':'大海水','乙丑':'海中金','乙未':'沙中金','丁卯':'炉中火','丁酉':'山下火','己巳':'大林木','己亥':'平地木','辛未':'路旁土','辛丑':'壁上土','癸酉':'剑锋金','癸卯':'金箔金','乙亥':'山头火','乙巳':'覆灯火','丁丑':'涧下水','丁未':'天河水','己卯':'城头土','己酉':'大驿土','辛巳':'白蜡金','辛亥':'钗钏金','癸未':'杨柳木','癸丑':'桑柘木','乙酉':'泉中水','乙卯':'大溪水','丁亥':'屋上土','丁巳':'沙中土','己丑':'霹雳火','己未':'天上火','辛卯':'松柏木','辛酉':'石榴木','癸巳':'长流水','癸亥':'大海水'}, + WU_XING_GAN:{'甲':'木','乙':'木','丙':'火','丁':'火','戊':'土','己':'土','庚':'金','辛':'金','壬':'水','癸':'水'}, + WU_XING_ZHI:{'寅':'木','卯':'木','巳':'火','午':'火','辰':'土','丑':'土','戌':'土','未':'土','申':'金','酉':'金','亥':'水','子':'水'}, + SHI_SHEN_GAN:{'甲甲':'比肩','甲乙':'劫财','甲丙':'食神','甲丁':'伤官','甲戊':'偏财','甲己':'正财','甲庚':'七杀','甲辛':'正官','甲壬':'偏印','甲癸':'正印','乙乙':'比肩','乙甲':'劫财','乙丁':'食神','乙丙':'伤官','乙己':'偏财','乙戊':'正财','乙辛':'七杀','乙庚':'正官','乙癸':'偏印','乙壬':'正印','丙丙':'比肩','丙丁':'劫财','丙戊':'食神','丙己':'伤官','丙庚':'偏财','丙辛':'正财','丙壬':'七杀','丙癸':'正官','丙甲':'偏印','丙乙':'正印','丁丁':'比肩','丁丙':'劫财','丁己':'食神','丁戊':'伤官','丁辛':'偏财','丁庚':'正财','丁癸':'七杀','丁壬':'正官','丁乙':'偏印','丁甲':'正印','戊戊':'比肩','戊己':'劫财','戊庚':'食神','戊辛':'伤官','戊壬':'偏财','戊癸':'正财','戊甲':'七杀','戊乙':'正官','戊丙':'偏印','戊丁':'正印','己己':'比肩','己戊':'劫财','己辛':'食神','己庚':'伤官','己癸':'偏财','己壬':'正财','己乙':'七杀','己甲':'正官','己丁':'偏印','己丙':'正印','庚庚':'比肩','庚辛':'劫财','庚壬':'食神','庚癸':'伤官','庚甲':'偏财','庚乙':'正财','庚丙':'七杀','庚丁':'正官','庚戊':'偏印','庚己':'正印','辛辛':'比肩','辛庚':'劫财','辛癸':'食神','辛壬':'伤官','辛乙':'偏财','辛甲':'正财','辛丁':'七杀','辛丙':'正官','辛己':'偏印','辛戊':'正印','壬壬':'比肩','壬癸':'劫财','壬甲':'食神','壬乙':'伤官','壬丙':'偏财','壬丁':'正财','壬戊':'七杀','壬己':'正官','壬庚':'偏印','壬辛':'正印','癸癸':'比肩','癸壬':'劫财','癸乙':'食神','癸甲':'伤官','癸丁':'偏财','癸丙':'正财','癸己':'七杀','癸戊':'正官','癸辛':'偏印','癸庚':'正印'}, + SHI_SHEN_ZHI:{'甲子癸':'正印','甲丑癸':'正印','甲丑己':'正财','甲丑辛':'正官','甲寅丙':'食神','甲寅甲':'比肩','甲寅戊':'偏财','甲卯乙':'劫财','甲辰乙':'劫财','甲辰戊':'偏财','甲辰癸':'正印','甲巳戊':'偏财','甲巳丙':'食神','甲巳庚':'七杀','甲午丁':'伤官','甲午己':'正财','甲未乙':'劫财','甲未己':'正财','甲未丁':'伤官','甲申戊':'偏财','甲申庚':'七杀','甲申壬':'偏印','甲酉辛':'正官','甲戌辛':'正官','甲戌戊':'偏财','甲戌丁':'伤官','甲亥壬':'偏印','甲亥甲':'比肩','乙子癸':'偏印','乙丑癸':'偏印','乙丑己':'偏财','乙丑辛':'七杀','乙寅丙':'伤官','乙寅甲':'劫财','乙寅戊':'正财','乙卯乙':'比肩','乙辰乙':'比肩','乙辰戊':'正财','乙辰癸':'偏印','乙巳戊':'正财','乙巳丙':'伤官','乙巳庚':'正官','乙午丁':'食神','乙午己':'偏财','乙未乙':'比肩','乙未己':'偏财','乙未丁':'食神','乙申戊':'正财','乙申庚':'正官','乙申壬':'正印','乙酉辛':'七杀','乙戌辛':'七杀','乙戌戊':'正财','乙戌丁':'食神','乙亥壬':'正印','乙亥甲':'劫财','丙子癸':'正官','丙丑癸':'正官','丙丑己':'伤官','丙丑辛':'正财','丙寅丙':'比肩','丙寅甲':'偏印','丙寅戊':'食神','丙卯乙':'正印','丙辰乙':'正印','丙辰戊':'食神','丙辰癸':'正官','丙巳戊':'食神','丙巳丙':'比肩','丙巳庚':'偏财','丙午丁':'劫财','丙午己':'伤官','丙未乙':'正印','丙未己':'伤官','丙未丁':'劫财','丙申戊':'食神','丙申庚':'偏财','丙申壬':'七杀','丙酉辛':'正财','丙戌辛':'正财','丙戌戊':'食神','丙戌丁':'劫财','丙亥壬':'七杀','丙亥甲':'偏印','丁子癸':'七杀','丁丑癸':'七杀','丁丑己':'食神','丁丑辛':'偏财','丁寅丙':'劫财','丁寅甲':'正印','丁寅戊':'伤官','丁卯乙':'偏印','丁辰乙':'偏印','丁辰戊':'伤官','丁辰癸':'七杀','丁巳戊':'伤官','丁巳丙':'劫财','丁巳庚':'正财','丁午丁':'比肩','丁午己':'食神','丁未乙':'偏印','丁未己':'食神','丁未丁':'比肩','丁申戊':'伤官','丁申庚':'正财','丁申壬':'正官','丁酉辛':'偏财','丁戌辛':'偏财','丁戌戊':'伤官','丁戌丁':'比肩','丁亥壬':'正官','丁亥甲':'正印','戊子癸':'正财','戊丑癸':'正财','戊丑己':'劫财','戊丑辛':'伤官','戊寅丙':'偏印','戊寅甲':'七杀','戊寅戊':'比肩','戊卯乙':'正官','戊辰乙':'正官','戊辰戊':'比肩','戊辰癸':'正财','戊巳戊':'比肩','戊巳丙':'偏印','戊巳庚':'食神','戊午丁':'正印','戊午己':'劫财','戊未乙':'正官','戊未己':'劫财','戊未丁':'正印','戊申戊':'比肩','戊申庚':'食神','戊申壬':'偏财','戊酉辛':'伤官','戊戌辛':'伤官','戊戌戊':'比肩','戊戌丁':'正印','戊亥壬':'偏财','戊亥甲':'七杀','己子癸':'偏财','己丑癸':'偏财','己丑己':'比肩','己丑辛':'食神','己寅丙':'正印','己寅甲':'正官','己寅戊':'劫财','己卯乙':'七杀','己辰乙':'七杀','己辰戊':'劫财','己辰癸':'偏财','己巳戊':'劫财','己巳丙':'正印','己巳庚':'伤官','己午丁':'偏印','己午己':'比肩','己未乙':'七杀','己未己':'比肩','己未丁':'偏印','己申戊':'劫财','己申庚':'伤官','己申壬':'正财','己酉辛':'食神','己戌辛':'食神','己戌戊':'劫财','己戌丁':'偏印','己亥壬':'正财','己亥甲':'正官','庚子癸':'伤官','庚丑癸':'伤官','庚丑己':'正印','庚丑辛':'劫财','庚寅丙':'七杀','庚寅甲':'偏财','庚寅戊':'偏印','庚卯乙':'正财','庚辰乙':'正财','庚辰戊':'偏印','庚辰癸':'伤官','庚巳戊':'偏印','庚巳丙':'七杀','庚巳庚':'比肩','庚午丁':'正官','庚午己':'正印','庚未乙':'正财','庚未己':'正印','庚未丁':'正官','庚申戊':'偏印','庚申庚':'比肩','庚申壬':'食神','庚酉辛':'劫财','庚戌辛':'劫财','庚戌戊':'偏印','庚戌丁':'正官','庚亥壬':'食神','庚亥甲':'偏财','辛子癸':'食神','辛丑癸':'食神','辛丑己':'偏印','辛丑辛':'比肩','辛寅丙':'正官','辛寅甲':'正财','辛寅戊':'正印','辛卯乙':'偏财','辛辰乙':'偏财','辛辰戊':'正印','辛辰癸':'食神','辛巳戊':'正印','辛巳丙':'正官','辛巳庚':'劫财','辛午丁':'七杀','辛午己':'偏印','辛未乙':'偏财','辛未己':'偏印','辛未丁':'七杀','辛申戊':'正印','辛申庚':'劫财','辛申壬':'伤官','辛酉辛':'比肩','辛戌辛':'比肩','辛戌戊':'正印','辛戌丁':'七杀','辛亥壬':'伤官','辛亥甲':'正财','壬子癸':'劫财','壬丑癸':'劫财','壬丑己':'正官','壬丑辛':'正印','壬寅丙':'偏财','壬寅甲':'食神','壬寅戊':'七杀','壬卯乙':'伤官','壬辰乙':'伤官','壬辰戊':'七杀','壬辰癸':'劫财','壬巳戊':'七杀','壬巳丙':'偏财','壬巳庚':'偏印','壬午丁':'正财','壬午己':'正官','壬未乙':'伤官','壬未己':'正官','壬未丁':'正财','壬申戊':'七杀','壬申庚':'偏印','壬申壬':'比肩','壬酉辛':'正印','壬戌辛':'正印','壬戌戊':'七杀','壬戌丁':'正财','壬亥壬':'比肩','壬亥甲':'食神','癸子癸':'比肩','癸丑癸':'比肩','癸丑己':'七杀','癸丑辛':'偏印','癸寅丙':'正财','癸寅甲':'伤官','癸寅戊':'正官','癸卯乙':'食神','癸辰乙':'食神','癸辰戊':'正官','癸辰癸':'比肩','癸巳戊':'正官','癸巳丙':'正财','癸巳庚':'正印','癸午丁':'偏财','癸午己':'七杀','癸未乙':'食神','癸未己':'七杀','癸未丁':'偏财','癸申戊':'正官','癸申庚':'正印','癸申壬':'劫财','癸酉辛':'偏印','癸戌辛':'偏印','癸戌戊':'正官','癸戌丁':'偏财','癸亥壬':'劫财','癸亥甲':'伤官'}, + ZHI_HIDE_GAN:{'子':['癸'],'丑':['己','癸','辛'],'寅':['甲','丙','戊'],'卯':['乙'],'辰':['戊','乙','癸'],'巳':['丙','庚','戊'],'午':['丁','己'],'未':['己','丁','乙'],'申':['庚','壬','戊'],'酉':['辛'],'戌':['戊','辛','丁'],'亥':['壬','甲']}, + YI_JI:['祭祀','祈福','求嗣','开光','塑绘','齐醮','斋醮','沐浴','酬神','造庙','祀灶','焚香','谢土','出火','雕刻','嫁娶','订婚','纳采','问名','纳婿','归宁','安床','合帐','冠笄','订盟','进人口','裁衣','挽面','开容','修坟','启钻','破土','安葬','立碑','成服','除服','开生坟','合寿木','入殓','移柩','普渡','入宅','安香','安门','修造','起基','动土','上梁','竖柱','开井开池','作陂放水','拆卸','破屋','坏垣','补垣','伐木做梁','作灶','解除','开柱眼','穿屏扇架','盖屋合脊','开厕','造仓','塞穴','平治道涂','造桥','作厕','筑堤','开池','伐木','开渠','掘井','扫舍','放水','造屋','合脊','造畜稠','修门','定磉','作梁','修饰垣墙','架马','开市','挂匾','纳财','求财','开仓','买车','置产','雇庸','出货财','安机械','造车器','经络','酝酿','作染','鼓铸','造船','割蜜','栽种','取渔','结网','牧养','安碓磑','习艺','入学','理发','探病','见贵','乘船','渡水','针灸','出行','移徙','分居','剃头','整手足甲','纳畜','捕捉','畋猎','教牛马','会亲友','赴任','求医','治病','词讼','起基动土','破屋坏垣','盖屋','造仓库','立券交易','交易','立券','安机','会友','求医疗病','诸事不宜','馀事勿取','行丧','断蚁','归岫','无'], + LU:{'甲':'寅','乙':'卯','丙':'巳','丁':'午','戊':'巳','己':'午','庚':'申','辛':'酉','壬':'亥','癸':'子','寅':'甲','卯':'乙','巳':'丙,戊','午':'丁,己','申':'庚','酉':'辛','亥':'壬','子':'癸'}, + DAY_YI_JI:'30=192531010D:838454151A4C200C1E23221D212726,030F522E1F00=2430000C18:8319000776262322200C1E1D,06292C2E1F04=32020E1A26:791715795B0001025D,0F522E38201D=162E3A0A22:790F181113332C2E2D302F157954,7001203810=0E1A263202:79026A176576036A,522E201F05=0D19250131:7911192C2E302F00030401060F1571292A75,707C20522F=0C18243000:4F2C2E2B383F443D433663,0F01478A20151D=0E1A320226:3840,0001202B892F=14202C3808:3807504089,8829=0E1A263202:383940,6370018A75202B454F6605=32020E1A26:38394089,0001202B22=16223A0A2E:384C,8A2020=2B3707131F:2C2E5B000739337C38802D44484C2425201F1E272621,5229701535=121E2A3606:2C2E2D2B156343364C,0F4729710D708A20036A1904=0D19250131:5040262789,0F7129033B=202C380814:5040000738,0F7D7C584F012063452B35=1A2632020E:50400089,8813=1A2632020E:69687011180F791966762627201E,0352292E8034=182430000C:291503000D332E53261F2075,0F5238584F450B=000C182430:297170192C2E2D2F2B3E363F4C,0F52156320010347200B=131F2B3707:297115030102195283840D332C2E,0F1F5863201D8A02=222E3A0A16:261F1E20232289,52290058363F32=16222E3A0A:261F201E232289,8D39=0D19310125:262322271E201D21,52450F4F09=0D19253101:262322271E202189,1F4526=16222E3A0A:262322271F1E20,712906=0F1B273303:17262322274050,80387C6B2C=0915212D39:1707702C2E71291F20,0F52000106111D15=16222E3A0A:170007386A7448363F261F1E,030F79636F2026=030F1B2733:1784832C2E5B26201F,0F010D2913=182430000C:175447440D15838477656A49,2B2E1F8A202228=101C283404:70504C7889,8803=0D19250131:700F181126151E20001A7919,8D2F=0915212D39:705283845B0D2F71,0F202E4106=3606121E2A:70786289,06802E1F23=1824000C30:70076A363F,292017=202C380814:700718111A302F717566,0F2B2E2026=3B0B17232F:70545283842E71291A7933192A5D5A5040,090C384F45208A1D6B38=212D390915:7039170F45513A2C2E7129242526271F201D,00010352153A=15212D3909:703911170E2C2E2D2F4B15712952633D,092B8A2027=010D192531:702D155483840F63262720,53292F017D4F38442B2E1F4717=16222E3A0A:705C4C39171A4F0E7971295B4C5248,0F2E1F1D37=1A2632020E:2E260F27201F,523815292F1A22=0E1A260232:64262322271F2021,0F2F293822=2F3B0B1723:161A0F1526271F4C,586103473818=2430000C18:161A7889,292E1F0F386131=17232F3B0B:04795B3F651A5D,0F5201062016=14202C3808:04170F79195D1A637566363F76,01522E8A2039=132B37071F:0470170F191A134C8384662426232227201E,8D08=0D19253101:040370181123220F1326271E2021,29153B=0D19310125:040307177938494C,0F26207017=0E2632021A:0403010218111A17332C2E2D2B15713E6575,45382064291D=142C380820:04033918110F0D2C2E7129332D2B72528384547566,8D1C=1830000C24:040318111A17332C15290D200C7A,4745063835=0F2733031B:040318111A16175B795452848315302F6563395D,387029202E=14202C3808:04031975363F6366,0F5401202C5283842E2F1E=0E1A320226:0403080618111A16332E2F152A09537919702C5445490D75072B,8063203820=182430000C:04067033392C7161262322271E1D210C,8D2F=101C283404:3F4889,881C=2733030F1B:3F74397677658988,0F3847201D=293505111D:3F8B657789,0F2029702E7D35=111D293505:3F8B6589,1F200A=020E1A2632:3F656477,0F2B71292005=111D290535:3F6589,8810=0F1B273303:3F88,2B38200F1C=293505111D:0F83843D363F776424,15462F2C52032971152A=0F1B273303:0F17795B54838458,52807C3811=121E2A3606:0F172C2E387129363F7566512C2E2D4E4461,01034752203A=172F3B0B23:0F171511793F76584C,0347200C1D20=2D39091521:0F175B3975660745514F2B4825201E211D,010352292E2E=0F1B273303:0F170070792C2E261F,040341232228=05111D2935:0F1700707129385C363F3D1F1E232226,80412B202F14=14202C3808:0F17000728705448757A,522E1F15562F05=30000C1824:0F17000102061979454F3A15477677,241F8A2021=2F3B0B1723:0F17000102060370392E52838453331F,452F2C266A79292B203810=0C18243000:0F170001020E032A70692C2E302F802D2B0D7129474C201F2322,5211183809615D34=1A2632020E:0F171170792F5B1566770001032C2B802D,29387C207134=14202C3808:0F0D33000103452E528384297115752620,63386F7014=15212D3909:0F7045332C2E71201F1D21,4701155229530327=101C283404:0F70161715232238838426271F20,7D035219=121E2A3606:0F705B0004037C5D15653F1F26,522B473809=131F2B0737:0F705215261E20,012E1F25=182430000C:0F707B7C00012F75,52201B=2531010D19:0F706A151E201D528384544466,47010C2E292F2C3820=14202C3808:0F707500261E20,382E1F05=3606121E2A:0F161A17452F0D33712C2E2B5443633F,150170208A0327=0E1A263202:0F150370002E0D3979528384532971331F1E20,477D0D=06121E2A36:0F5B8370000102060403161A494447,386A418A201A=17232F3B0B:0F03700D332C2E2971152F52838463,01004547380C26=101C283404:0F03700D33195284835329711563,01260038206B0E=131F2B3707:0F03706A4F0D332C528384532E29711563,450075000F=131F2B3707:0F0370010239332E2C19528384532971156375262720,8D18=17232F3B0B:0F0370390D332C192E2971637547202322,581528=0E1A263202:0F0302791566046F,29710D722A38528384202E4530=0E1A263202:0F030102392E15634447001F1E,293845200D707538=1E2A360612:0F0300017039712952542D2C302F80380D2A363F3349483E616320,1118150C1F2E20=33030F1B27:0F03000102700D29713963451F0C20,528338542F15806128=121E2A3606:0F030001027039452971150D332C2F6327,2052838403=2C38081420:0F030001022A0D3945297115528384630D7020,476A382E1F4426=010D192531:0F03390D332C1929711563261D2E2322,382000521118750C706B15=131F2B3707:0F033915666A52261E272048,382E2F6329712C0114=0D19253101:0F52838403700D332C29712E1F27201E2322,1545017505=131F2B3707:0F528400012E7129,092026=3707131F2B:0F528471295B795D2B155333565A446375661F201E272621,00016B0C4113=14202C3808:0F280001363F8B4326232220,2E1F47032F7D35=16222E3A0A:0F0211195465756679,2F384570202B6A10=15212D3909:0F0102700D332C2E2F0319528384531529716345261F2322,8D32=101C283404:0F0102037039330D5284832971152E1F0C,0026206B37=16222E3A0A:0F003854,20521D2106=020E1A2632:0F00175058,5D6B80382E16=1B2733030F:0F00701784831952712C2E1526271F,033806201F=2B3707131F:0F00701A17830E544C5C0E78,7129632E1F38208A452F16=15212D3909:0F00040370396A742E15444948,458A384F2021=16222E3A0A:0F005B261F20,2E2F1D=2531010D19:0F0003450D3329712C2E2F1575,528A63705A20587D7C12=17232F3B0B:0F00030D70332C2E3952838453542971156375,6B2019=1B2733030F:0F000301020D297115332E1F0C,165220262E=121E2A3606:0F00030102700D332E2C192971155383846375261F1E20,8D1F=33030F1B27:0F00030102700D19297115332C2B535448,2E45208A00=2632020E1A:0F00030102705283842E544779,2920454F754C3836=16222E3A0A:0F0052037029710D332C15,7545584F8A201D2121=121E2A3606:0F00074850,8A2036=0D25310119:0F00071A706A717677492923221E202726,80522E1F39=1E2A360612:0F006A385040740717,1F70631E=212D390915:0F006A1938271779,565A4575522F801F1E632B=121E2A3606:0F00010D0302703352838453297115632E,208A454F2B=0E1A263202:0F000170390D332E2971152F63751F1E20,52846A381F=14202C3808:0F000106387129,2E1F24=14202C3808:0F0001062E7129,522010=0814202C38:0F0001062871292E7C528384032C5C2A15767765,11185D8A206B08=131F2B0737:0F0001067C1F20,522900=202C380814:0F0001020D700339332C192A83842971152E1F0C20262322,065256386110=111D293505:0F000102700D332C2E297115383F631F20,0347562B=14202C3808:0F000102700D332C712E15261F201E,80036A61473831=0C18243000:0F000102700D335283845329711563,38048A7D45202A=14202C3808:0F000102702E15471F1E,294F2B452C2F268011=0D19253101:0F0001022E792D3E75663D19,472063703852292B39=222E3A0A16:0F0001022E154826271F1E203874362322,036312=0D19253101:0F000102032971152C2E19,4720637038522B15=111D293505:0F000102030D70332E3919528384532971152B2F201F0C,8D1B=232F3B0B17:0F000102030D7033528384534529711520,63475814=131F2B3707:0F000102030D332C2E195283845329716375261E2322,8D19=15212D3909:0F00010203700D332C2E1929711552838453637526202322,8D09=111D293505:0F00010203700D332E2F192971152B52838453631F20,8D33=1A2632020E:0F00010203700D332E2F1929711552838453261F201E2322,8D03=2E3A0A1622:0F0001020370332C2E2F1575261F,2971476A458352380C=111D293505:0F0001020370332E2F0D19297115637566302B2C3979,8D08=000C182430:0F000102037039297175261F1D21,454F2E1563410F=17232F3B0B:0F0001020370390D3319297115632E2C752620212322,8D07=3606121E2A:0F0001020370390D332C1929712E157563548384534C,20248A38=16222E3A0A:0F0001020370390D1952838453542971631F0C,152036=14202C3808:0F00010203703915632719792322,80262045297158750F=111D293505:0F00010203528384157033,752971206B452F2B262E05=3404101C28:0F00010206030D7129302F79802D7C7C2B5C4744,11701D2052843833=111D293505:0F00010206181139702E1F686F6A792D2C2E304E15337566491F23221D21,52296B0D800D=15212D3909:0F000102070D70332C2E19528384297115637526201E2322,8D05=2C38081420:0F0001021A175D2C19152E302F7183846379,8A20704F7545410A=131F2B3707:0F001A651707,565A58202E1F476320=121E36062A:0F11707B7C5271291E20,2E1F39=111D293505:0F11700001522E71291F20,2B07=131F2B0737:0F11700001397129,2E2002=111D293505:0F11707129,2E1F2002=131F37072B:0F1152702E2F71291F20,000103=131F37072B:0F1152702E2F71291F20,7A3A=111D293505:0F117B7C2C2E71291F20,520300=111D350529:0F110001702E2F71291F20,0621=101C280434:0F11000170717B,522E1F0A=06121E2A36:0F110001708471292E1F20,03388051561C=121E2A3606:0F1100017B7C702E7129,522B22=2D39091521:0F110039702C2E522F1574487B7C2D4E804B,098A204538612B=05111D2935:0F1118795B65170002195D,52382E8A201E=2531010D19:0F111829711500010370390D332E750C201F,4552832F382B8004=2A3606121E:0F1118175C000301027039450D29332C2E2F15631F,8A582020=31010D1925:0F1118032A0D545283841A802D2C2E2B71296366774744201F26232221,010900150C06=2C38081420:0F11180300706A2E1549466319,292F26806B382B20754506=2E3A0A1622:0F1118528384530001035C53702971152B332C2E63201F1E23222621,6B75452D4F802E=111D293505:0F1118060300017B7C792E39767566261F20,7129805136=232F3B0B17:0F111800171A454F514E3A3871157765443D23221E262720,80612E1F1C=212D390915:0F11180003706A4F0D332C2E1929711571335363751F20262322,524746416128=3B0B17232F:0F111800037039450D2971332C632026,1F2E2B38528327=3B0B17232F:0F11180006032A0D700D332E011954838471152C202322,58477D630C=0814202C38:0F1118000106287129705B032C2E302F802D4E2B201F,528458384108=380814202C:0F11180001027039302971542F7526201E,63472E151F583A=1E2A360612:0F1118000102030D70332C2E192971158384535426201E2322,471F1B=1F2B370713:0F1118000102030D70332C2E195283845329711563261F0C20,4745752522=3505111D29:0F1118000102030D70332E2C192971153953631F0C262720,5284612528=390915212D:0F111800010203700D332C2E192971152F4B49471F270C2322,52562B2029=390915212D:0F111800010203391929710D1552838453,2075708A456309410F=0A16222E3A:0F111800010206032A0D09717029092D302F1575761320,521F47251D=1F2B370713:0F1118000102111A1703154F2C2E382D2F807566,7163708A1F207D2A=05111D2935:0F111800017C5C2C2E7129,527015382021=2B3707131F:0F11185C0370332D152322528384636626271E,2F292C2E1F00010601=2430000C18:0F11185C0001092A0D7014692983847B7C2C2E302F802D2B,06454F208A2E=0D19253101:0F11181200171A7919547638,5215201D09=3A0A16222E:0F1A1716007015713F261F2720,5263587D2B470304=111D293505:0F1A0070153871291F20,7A7629=010D192531:0F181179005B712980152D4E2A0D533358,5270208A11=0814202C38:0F181138171A7975665B52845415,47701F8A2013=121E2A3606:0F181117795B5C007054292A0D690403332D2C2E66632B3D,8A454F3822=121E2A3606:0F1811705200012E71291F20,382A=16222E0A3A:0F1811705200012E71291F20,062B27=14202C0838:0F18117052000171291E20,2E1F27=16222E0A3A:0F18117000012E71291F20,527A06=111D290535:0F1811700001062E2F1F20,712912=14202C3808:0F181100062839707952542C2E302F03565A7566441F1E,0D29802B2029=1824300C00:0F181100012C2E7129,522025=121E2A0636:0F18110001261F20,03522E=0915212D39:0F18110001702C2E7129,6F454F098A2025=030F1B2733:0F18110001702C2E71291F0D2B152F2127,5283162014=16222E3A0A:0F18110001707B7C0D7129,52565A152B2034=17232F3B0B:0F1811000104037115454F7677657B7C392023222726210C,52092E1F27=3707131F2B:0F181100010603797B7C802D302F2B6743441F202322,2952477D2528=14202C0838:0F181100017B7C2E71291F20,036F33=0D19253101:0F18110001027939706954528384685D15565A75201E1D26,29032E11=182430000C:0F1811000102062A0D2C2D804B2B672E2F7129,70471F8A2030=17232F3B0B:0F5C707971292C2E0E032A0D6A79804B2D8C2B3348634C,52110915462031=15212D3909:0F5C5B0001032A0D7052842C2E71291F20,1118517D462B=0F1B273303:0F5C111800015B712952841F20,756A251A=2733030F1B:1545332C2E2F84836375662620,0F0003700D71292B1C=0E1A320226:1516291211020056,06382007=000C182430:1551000403706A454F3A3D771F262322271E1D21,382B41522016=17232F3B0B:1500443626271F1E,29710F47380D19520337=182430000C:150001021745512E443D65262322,2B63387C18=192531010D:151A83842627202322,580F7003632E1F297C26=0E1A263202:15391A302F83845475662627201E,0F702E4629004708=3606121E2A:5B000102073911522C302F3A678C363F33490D482425200C1E2322,0F15382E1F6116=1E2A360612:5B71297000010611182A0D39792C2E332D4E712980152C1F202621,52454F3804=2C38081420:5B11180001020328700D332C2E195283847115632F751F2720,290F476630=0C18243000:201E27262322,8902=3404101C28:2A0D11180F52848353037039156358332C2E,3820002628=010D192531:4089,030F565A61206B27=1824300C00:4089,8836=1C28340410:0370833F0F6A5215,010D582E1F202C2F582938=112935051D:03700F,79192C2E2D715275262322271F201D217936=112935051D:0370110F45510D3371290941614C522623222720,8D3B=152D390921:03047039171A533852443D363F,8D11=0F1B273303:030402111A16175B4F3A2B153E0079015D5452848369026A51,7006200F05=0F1B270333:03041A174533302F56795B3E808339528454,700F292026=121E2A3606:037B7C2E2F261F20,0F14=1E2A360612:030270170F45513A2C7129528384702A0D532D2C24252623222720,155A382E1F2F=1B2733030F:03027011170D332D2C2E2F716152838454,010F201F2C=121E2A3606:03027039450D332C2F2D2971528384636626202322,581535=212D390915:03020E0F18110D332C2E2D2F4971293E615244756653,8A202531=1B2733030F:030102703945802D2C512B7129092322270C7566,112E528325=2D39091521:030102062C2E543E3D636679,380D19462971001F=293505111D:03111A171538193E3F,0F632C2E70454F200C19=17232F3B0B:031A2B7915656A,0F177001204529710D632E2F02=32020E1A26:033945302F838475262720,297071000F2E1F3810=17232F3B0B:0339332C2E1575201E26,0F520D631F29712A72473826=390915212D:0339332C2E302B66201D1F27,0D2971010015520F6B0E=15212D3909:03392D2E332F211D201F1E27,0F7015380029710D195824=16223A0A2E:036F791E20,522E1F31=1D29350511:5283845B79037B7C802D2C2E4E302F2B38493D4463664C1F2021,0F0D712917=15212D3909:5283845303702971150D2F,388A6A6D0F2012=111D293505:528384530370331929272E2B2F631F1D20,0F156B380E=0D19253101:528384530339454F0D297115332E2F637520,0F00705802=2A3606121E:528384530339332E152C2F58631F20,380D000F2900=283404101C:528384530003010215392C20,1112180F29560D2E1F754511=15212D3909:5283845300031929150D332C2E63,0F217045208A717521=3505111D29:5283845300010670528384802D2C2E4E155B201F1E232221,380F71296A0E=17232F3B0B:5283845354037029711575262720,631F58000F2E38010D=111D293505:528384000103451915332C2E631F2720,29716A0D0F7019=1D29350511:5283840001032E1570637566302F391F,0F4729712030=16222E3A0A:5283845479036A2627201E,0F380D70297115012F1A=1F2B370713:528384542E03700F1118705469565A7566631F1E2021,297138000C31=121E2A3606:52838454443D65002C2E15495D1F,0F417D712B38630F=0D19253101:5283845444360F11756415,2C2F29016B472E2B20381D=212D390915:528384545363000103332E15,0F1F197029710D757D2032=121E2A3606:528384546315332C2E2F26201F2322,0F0D45002971756B17=192531010D:52838454754C2971150301022E,0F63206A0938268A4117=1B2733030F:52848353000103297115332E2F19,0F8A514F6A6620754526=1824300C00:528403395B2F1E20,0F012D=0B17232F3B:5254700001020612692D4E584647336375662E1F1E,71290D262037=131F2B3707:525400045B17791A565D754C7866,2E1F207C34=0F2733031B:483F89,8838=232F3B0B17:767779392623222789,152B1F1D200E=0A16222E3A:767789,528300292025=14202C3808:7665261F20,0F291A=222E3A0A16:7665262322271F201E21,0F0029807124=1824000C30:7889,292E1F24=101C283404:8D,8832=1D29350511:63767789,522E0006206B31=131F2B3707:7B7C343589,0F7038=2632020E1A:7B7C343589,520F20=0E1A260232:7B34,8812=1C28340410:02703918110F7919155283756626232227201E,012C2E1F0C29=121E2A3606:020F11161A17454F2C2E2D302F2B38434C,2070016328=1824300C00:02060418110D332C2E415B637566262322271F20,520F23=142038082C:07504089,0F010C=15212D3909:07262723221F40,0F7129523B=2430000C18:0717363F1A2C4F3A67433D8B,71290F0103471A=2531010D19:0704031118528384542D2E4E49201F1E1D2127,292B000C3B=283404101C:073F7765644889,012014=111D293505:074048261F202322,0F71454F1500018008=111D293505:07404826271F1E2089,882C=0D19253101:07565A5283845463756677261F20,010F15296120=2F3B0B1723:07487677393F89,0F2952151F1D30=111D293505:074889,06520F3808=17232F3B0B:074889,883B=131F2B3707:074889,8832=15212D3909:07762623221F1E20,000F1552296B2F2A=0D19253101:0776776A742623221F200C211D1E,11180F2F5206802B0B=04101C2834:0776776564,000F29382011=101C283404:0706397B7C794C636A48,520F7129472026=14202C3808:077C343589,880A=380814202C:076A79040363660F5D363F,52292E1F20382F15560123=16223A0A2E:076A696819,0F2918=222E3A0A16:076A171552847983546578,712970010F2D=182430000C:076A48,45752F29384C0F204F612B30=131F2B3707:076A7626271F1E20,0D0F29382F2E0E=0814202C38:07343589,065238=1C28340410:070039201F0C2789,06030F292F23=101C280434:076564,0F292002=0D19253101:073918111A17332C2E71292322271F1E20481D45548384,38002F702A=1824300C00:7C343589,8801=172F3B0B23:6A79363F65,0F292B7118=1B2733030F:6A170F19,5845754C201F4F382430=1B2733030F:6A170F1963766F,5452201F32=0C18243000:6A0339332C20528384531563,29713801000F0C47806B3B=2A3606121E:77766564000789,0F52201E8A01=202C380814:1F2027260076232289,0F29528339=0F1B330327:3435,8809=0F1B273303:34357B7C,8818=121E2A3606:34357B7C7789,0F291D=232F3B0B17:34357B7C89,0F2021=33030F1B27:34357B7C89,030F27=390915212D:34357B7C89,712917=1D29350511:3435073989,8802=2C38081420:34357C89,0111180F292006=30000C1824:34357C89,71291A=14202C3808:34357C89,8A2036=182430000C:3435000789,8835=232F3B0B17:34350089,0F2025=3707131F2B:34353989,0F2037=0D25310119:343589,0F52202D=0F1B273303:343589,0F7152290D=131F2B3707:343589,8830=121E2A3606:343589,881C=16222E3A0A:343589,8819=131F2B3707:343589,880F=15212D3909:343589,8832=14202C3808:343589,8813=0D19253101:343589,8811=17232F3B0B:343589,881E=142C380820:017018110F1A2E15495247838463462322271F,8D03=0F1B270333:0103040818111A155284262322271E20217A79708330,38472E631B=14202C3808:010670170F0E3A294152838454262322271F201E,2E1815442C=0F1B273303:01067071292C2E1F20,1103150F520A=17232F0B3B:010670181126271F202165,293816=182430000C:0106111839513A2C2E2D2F8C804B4723221F63,7152292037=0F2733031B:010203040618110F3315292A271D200C6339171A712C2E30491E21,7A21=0E1A260232:010206040318110F2E292A27200C70072C302F541F392B49,381512=1A2632020E:010206110F452C2E7129095B5226232227201F0C,58804B036B2B381C=142C380820:01023918112E2D493E52756624262322271F20,8D12=121E2A3606:008354,06462F2E1F27=030F1B2733:00797084831754,0F2E472D4E1F06=0D19250131:0079701811072C2E01060F33152627200C7A1A302F4576631F2B,8052382900=172F3B0B23:00790F072C2E0103047018111A262322271E7A302F5448637545,293815561E=101C340428:007952151E20,0F2E1F33=0F1B273303:007984831A160F1719,632E20471D6B01=152D390921:0079110F0304062A528423222627207A19701A2C2E2F5D83,294513=0F1B273303:0079181A165B332F2B262322271E2021030469702D4E49712930845D,454F05=152139092D:0079192E2F030417332D1552847A5D,4E201F=162E3A0A22:003826232277,632E20523A=0D19310125:0038262389,521513=1C28340410:00384089,0F202E157C07=04101C2834:00384089,152967631F=101C283404:00384740,0F2037=1C28340410:00387765504089,0F157C04=131F37072B:00385476,521F13=16222E3A0A:003854767789,2E1F522010=131F2B3707:003854637519,205D1D1F52151E210F=121E2A3606:003889,52201F1D4733=121E2A3606:003889,881F=212D390915:001D23221E2789,52290F2E1F202B=07131F2B37:002C7080305C784C62,2E1F472001=283404101C:004D64547589,0F292E=131F2B3707:005040,522E1F0F2C2004=3404101C28:005089,032C2E1F33=182430000C:005089,8815=192531010D:00261F23221E201D2189,8D12=131F2B3707:00261F2322271E200C89,8D1E=121E2A3606:0026271E20,2F2E1F33=16222E3A0A:002627241F1E20232289,8D33=14202C3808:002627651E2027232289,881B=182430000C:00262789,292C2E1F2B2F2A=07131F2B37:00262322271F1E203F8B65,52290F038002=15212D3909:001779332D2322271E2007760304,38290F1C=1F2B370713:00173883546365756619,466115201F701D47522434=0D25310119:00170F79191A6540,712909387C2015=0E1A263202:00170F332C2E2D2F802952443F26232227201F,15637C383A=132B37071F:00170F7665776489,8D2A=390915212D:00177689,0F52804F2507=2E3A0A1622:00177179546A76,0F52443D1F2D=0915212D39:0070,0F292C2E791F13=131F2B3707:007083624C,0F38202E7D4F45471F7107=380814202C:00704F0D332C2E2D15363F261F20274C,0F2906036F4703=3404101C28:00702C2E164C157126271F1E202425363F,29386A032B0F=0F1B273303:00700F1715262720,472E386309=15212D0939:007022230726,2E17712952302F15=15212D3909:00704889,8834=1C28340410:0070784889,0345201F21=2D39091521:007007482089,2E1F58470B=0D19253101:0070071A010618110F5B52846775,6326202E=16222E3A0A:00701A17794C0F302F715475,2E454F8A20243A=0F1B330327:007018111A1617192E15382627201F656477,4F090A=0F1B273303:002E2F18110F5B3315292A26271F20210C7A70710102393E19,035A37=14202C3808:002E4344793F26271F20,03702C2F292B381A31=0E1A263202:00161A5D454F153826201E27,7D0D2904=152139092D:0004037039180F332D152952262322271F0C533A83,4117804735=1F2B370713:0004037B7C0F79494766754667,80293869208A1E=162E3A0A22:00040301067018111A0F332C15292A261E200C7A791970712F5D52838454,5617454F06=3404101C28:000403110F527079156523221E2027,0129802E1F6B1D=1830000C24:0004031A170F11332C2E302F1571292A657677451949,70201D5218=102834041C:0004031811171A5B332C2E155D52,0D29204504=17233B0B2F:00040318110F1519262322271E2021,52831F3825=3B0B17232F:00046A7966444C7765,010C202F38520F70292E31=14202C3808:003F261F202789,8836=131F2B3707:003F657789,7152290F032B3A=2632020E1A:003F651F0C2027232289,0F292B=16222E3A0A:003F89,8836=212D390915:000F76,032E1F522C292B22=2B3707131F:000F7765,2E1F7C4607=0F1B273303:000F01111A1615292A2627200C2C670279538384543E49,634512=0F1B273303:000F1320,6380382936=0F2733031B:000F1323222627,2E3829031535=0D25310119:00676589,0F200F=0C18243000:00401D232289,71290F47202B=101C283404:0040395089,8803=30000C1824:004023222089,0F291118470D=0A16222E3A:004089,0F5211=1A2632020E:004089,0F0147200B=3A0A16222E:00037039454F0D332971152C4C48,090F476341382E0A=111D293505:00037039041A26271F1E202322,0F2F2C335129452E0D3A3B=222E3A0A16:000370396A450D332F4B154C,0F208A7D41381F2E14=0F1B273303:00030401061A16170F332E71292627200C02696A45514F0D2C2D4E497A,2B0B=0F1B273303:000304111A33152D2E302F71292A5284530770022B,0F6345203B=0F1B330327:00030418111617332E2D2F292A52845407020D302B,090F452001=0F1B273303:000304080618110F1A2E2D0D3371292A2C302F7566010239454E802B,632039=2430000C18:00036A7415384878,45751F20240F522E834F2E=182430000C:000301394F2E154763751F27,0F707A802629710D192035=14202C3808:0003391983845475,2E1F0F6A702971722A0D04=0F1B270333:00483F,6338200F2A=3B0B17232F:00481F2023221E27262189,0F292C2E1B=122A36061E:0076645089,8819=202C380814:0076777566262322271F201E,0F111852290D=101C283404:00763989,0F2036=1E2A360612:00788B89,0671292E25=010D192531:00784C00793989,0F29702E1F208A21=31010D1925:0006261F1E201D212322,0F2938111801=2A3606121E:00060403702C2E4C154947443D651F,0D2920=101C283404:0006522E261F20,0F712939=2632020E1A:00060724232227261F2025,520F157929382F22=31010D1925:0006547677,0F5229151F201B=0E1A320226:00061A161718110F292A0C26271F212A79700102212F49,470D=0814202C38:002876396577261F20,5283290F37=212D390915:0028397976771E232227,0F522E47442027=121E2A3606:006389,8822=101C280434:007B7C3989,881E=1830000C24:007B343589,8805=2E3A0A1622:00021719792B155D5466774962,010611180F292030=14202C3808:00020370454F0D3933192C2E2D156375261F202322,0F7123=0E1A260232:0002070818111A16175B153E445D5452848365647576,2038454F15=182430000C:0007385476771548,52061F2024=2D39091521:0007504089,0F29157030=15212D3909:0007504089,060F71702F2918=15212D3909:0007504089,880B=17232F0B3B:000770171989,0F2E20382F=0B17232F3B:00077089,522E1F8A202C=07131F2B37:000704036939487C4466,0F7011293821=1824000C30:000715547776,521F18=0E2632021A:0007030401021811171A0F2E2322271F1E706749528483,202F293800=0F1B330327:00077663,0F297138202C=0B17232F3B:000776776548,0F1118152E1F2017=121E2A3606:00077665776489,52830F208A14=1A2632020E:00077B7C4834353989,2952203B=2632020E1A:00076A386563,0F7D8A2066454F52754C15=1E2A360612:00076A0F3874485040,06707C2509=3606121E2A:00076A74504089,5229702C7D15=14202C3808:00076A74173926271F1E20,0F7029522B09=000C182430:00076A54196348767765,7920297115528A0D382B16=101C283404:000734357B7C3989,0F528329200C=06121E2A36:0007343589,290F7104=2E3A0A1622:0007343589,0F292F702012=182430000C:0007343589,0F71296B708003=15212D3909:0007343589,7129706300=0D19310125:0007010618111A332D302F15262322271E530270164C,560F712924=0E1A263202:000701020618111A175284835407230C7027,262038292C=111D293505:0007711F204840,010F29153814=17232F3B0B:00076527262322,1552835A201D0F382D=0D19253101:0007363F8B3989,09292C208A0F28=030F1B2733:000739483F66,0F208A2B0A=04101C2834:0007397B7C343589,0106522008=020E1A2632:0007396A48343589,0F203A=283404101C:00073934357B7C89,0F5223=3505111D29:000739343589,032010=0A16222E3A:000739343589,520F2F=111D293505:000739343589,8A200A=15212D0939:00077A7089,8817=17232F3B0B:000789,8D3B=172F3B0B23:000789,8815=1B2733030F:007C343589,881B=212D390915:007C343589,8812=15212D3909:006A79190F6F2627,6B46204538290B=380814202C:006A38075040,0F630141202B454F2D=121E2A3606:006A5040077448,702B2C0F2F292E=0B17232F3B:006A583F232227261F20,0F291547031C=232F3B0B17:006A6F391974,0F2E614447702C292F71201F38521F=31010D1925:0034353989,522E1F2B=0D19253101:00343589,060F5200=2A3606121E:00343589,7129565A01=131F2B3707:00343589,883B=111D350529:00343589,8800=152D390921:000150402627,0F292F2B1E=2733030F1B:00010F17505840,565A80385283846315=101C283404:000103020611187B7C2D4E616439201E0C26,522E474429=101C283404:0001030239450D297115332C2E4C,0F542070528438632C=101C283404:000103392E54837548,19700F58157A20381F=1830000C24:00010670175B71292A152322271E,03637C2B380F=0E1A263202:0001067052842E71291F20,030F38477533=131F2B3707:0001067011185B0D332C2E2D712909262322271F200C,0F5263250C=17232F0B3B:000106040318111A170F33292A26276A201D0C7A71077C1F1E74694F,520A=0D19253101:0001060403232226380F767754,568020152D=111D293505:000106025B7571295B04032D302F382B2A0D801E20,2E1F0F0F0C=0D19253101:00010607155B5C26271E2021165D83,38470F2920=16222E3A0A:000106073018110F3329271E0C7A0D75,3826201508=0F1B273303:00010618111A16332C2E2F2D27200C07483A450D,1552843825=0E1A263202:000102261E2027,03476F700F2971382E39=15212D3909:0001027007834878,2E388A201D17=131F2B3707:00010203450D3329152C2E2F5375,0F638A6A1D8A382D=0E1A263202:000102030D70332C2E29712F534426201F1E,0F38152F=121E2A3606:0001020370450D332C2E2D152971,0F52838A201D1B=1D29350511:0001020370528384631575712D2E4E3E581F1E1D,292C2B452620803A=222E3A0A16:0001020370392F2971152B54754C,458A1F0F20462C=14202C3808:0001020370392F80712B546675201E26,1F58472E152F=16222E3A0A:000102037039714515750D33,201D381F092E0F1103=32020E1A26:000102030F7039453319152E2D2F63751F0C1E20,71290D38472C=16222E3A0A:000102035270392E2D5863,0F381D2B2921201511=131F2B3707:0001020352666A,0F7020262938172F3A=2430000C18:00010203332C2E2F1558631F,0F1920707A2971264627=05111D2935:0001020311180F702E1F7952838468332D6749443E46630C1E1D21,292B2035=1C28340410:000102031118396375664819,1D4138702080291F=232F3B0B17:000102033945332C6375201D21,0F1929710D702D=101C283404:00010203390D3329152C2B751E20,2E1F54475352458316=111D293505:0001020339161745514F2C190F1A16152E2D2F304979,8D13=17232F3B0B:00010203396A79637566201D211E,29387D71707A30=101C283404:000102033911170D3319152E2F0947442627201F,8D25=3505111D29:000102031811392E2D19528384543E4463751F20,152F1A290F0D=0E1A263202:0001020626232227201E,0F2E03801F0F=101C283404:0001020617385483,030F47202B6B1B=2733030F1B:000102060F17705283797823221E2027,2E712910=121E2A3606:000102062A397129797B7C2E1F2425,162F5D20262B=182430000C:0001020603691817452C2E2D498344,412B6A09633808=3A0A16222E:0001020603700F7B7C2E1F692D48302F565A586366240C21,2B151A292039=17232F3B0B:000102060717706A33392D2E4E674447482322271E210C,71292B4F2023=33030F1B27:0001020607036A5D397C7C2163664744,0F4E25208A08=04101C2834:000102060775261F20,71290F70150C=101C283404:00010206111803302F565A802D4E2B881F261E0C,0D0F521B=16222E3A0A:00010206090D5B7952838454685D7B7C443D77656366201F1E,030F47454F24=010D192531:000102071283542627201D210C4C78,29580F2E6352032E1F01=32020E1A26:00010275261E0C2322,6303706F0F292E1F19=0E2632021A:000102081A158483262322270C1E,700F292E1B=101C283404:00011A1615262322271F1E200C214C,472B0F1124=3707131F2B:00013974150726271F1E200C,0F06520D297170382B4507=17233B0B2F:000118111A16175B154C26271E200C232279302F5D528384547543,0F297C7A03=17232F3B0B:000118111A332C2E2D1571292A2627200C7A1979,387C02=172F3B0B23:000118111A332C2E2D1571292A23222627200C7A791970302F5D5283845456,387C454F1F=0E1A263202:0001081811171A160F1571292A26271E20396476452B0D,632E523813=15212D3909:00211D1E232289,8D16=0E2632021A:006526232227201F,8926=05111D2935:00657689,6B0F5225=16223A0A2E:00654C89,8D03=2A3606121E:006589,2970472008=15212D3909:001A170F5B332E2D7129261E203E5D,1503528306=152139092D:001A170F1379232227761926,71293833=1C28340410:001A1715838444363F261F1E200C2322,0F476B52036338=14202C3808:001A2B5448701938754C,152E20242510=0D19253101:0039504089,8D39=283404101C:003926271E20747677642322480C06,2E1F38=0F1B273303:0039262322271E201D210C0748766465776A,150F382939=202C380814:0039332C2E2D2F152B4644261F1E,0F7019382971637A31=192531010D:0039787989,1F2E2010=101C283404:0039787089,2E1F8A034F206B29=05111D2935:00398B7989,0F200C=131F2B3707:0039077426271F1E20,0F29713852832B632D=14202C3808:0039076A7426271F2048,0F79197029717A382C=0E1A263202:00397C343548,8929=3B0B17232F:003934357B7C89,0F2028=16222E0A3A:0039343589,8D34=16222E3A0A:0039343589,880B=111D293505:0039343589,8805=17233B0B2F:0039343589,882E=101C283404:0039343589,8806=17233B0B2F:00390103040618111A17332C2E262322271E157A7071302F45631F2075,807C2B=0915212D39:00396577647969271E2322,52012E1F2620612D=16222E3A0A:00391A6A15384C4943363F7448,0F0379472B6319=192531010D:00394C786F89,0F2E442035=182430000C:003989,882A=121E2A3606:003989,8816=13191F252B313701070D:003989,8801=0D19310125:003989,880D=0F1B273303:0018112C2E01040607332D292A09270C2322696870302F47023945,382052801C=101C340428:00190F153917701A48,472E1F200334=1F2B370713:00195475667689,5229152E2019=222E3A0A16:004C504089,0F5215470A=3A0A16222E:005C702C2F802B154C78,5A562E1F208A45466319=102834041C:0089,090F1538=131F2B3707:71297C790001062A710F802D,5215705D2F=0E1A263202:7100030170391959152E2D2F2B39,0F201F4F75668A3824=030F1B2733:5483846376656419786A,298030201A=2430000C18:5452838479195D00012A0D7B7C2C2E3348156366242526201E,0F71292D=07131F2B37:54528384700001020339482D301571565A363F637566,06292B201F8A29=030F1B2733:54528384036F796A153E65,7129631D=2733030F1B:5452848303152F802C2D,2E1F208A7A700F29710C7D22=33030F1B27:118384155B20272E1F21,0F03380E=0E1A263202:1179302F842627201E,0071292E1F0E=06121E2A36:11177B7C52842C2E5B1F20,060071292F0F0E=101C283404:110F70528475660D7129,012E1F20262A=101C283404:110F03706A795215636626271E,0C012F38062C292B07=020E1A2632:110F0001702C2E7129201F,52060C=0E1A263202:110F00017052792E1F1E,71290D2B2020=293505111D:110F1A6A702C2E1952838453712F6375,45201500011D=101C340428:11037B7C2E2F7129,0F52200B=0E1A263202:11000170792C2E7129,0F52201F01=111D350529:110001527B7C2E75,0F2009=04101C2834:1100010206702D804E2B2620,0F52540D00=131F2B3707:110001392E1F20,0F712932=17232F3B0B:11715452838454292C2E302D4E092A0D50407970443D,5680410023=2B3707131F:111879690001020370396A2E2D528384543E637566,0F380D580F292000=222E3A0A16:111879076A1A171523221E27207924,5229700F1D012E292B0C2F0B=06121E2A36:111817000106702C2E71292A0D33802D302F4E2B44,0F52252029=07131F2B37:11180F000704030D7C684580302F153867534775,70204119=2430000C18:11180F00012A0D70795D7B7C39332D2C2E4E4863664C,064F478A2037=1E2A360612:11180F000152548471702C2E2D4E303348492A156144474C63,8A201F38450618=202C380814:11180F000128032A0D7129302C2E302F2D802B09411F1E20,5284543824=2F3B0B1723:11180F0001020370391952845329712B632E7B7C792D2C8020,385D151E=293505111D:11180F0001020339700D29716375662E1F2620,3815568016=16222E3A0A:11180F000102587B7C5283847971302F804B2B497675,09612E1F201E=232F3B0B17:11180F00010E715229702E79692C2E2D2B15093954444C6666,2F565A806132=131F2B3707:11180F71297052838454792A0D33802D153853201F1E212627,012F56476628=3707131F2B:11180F71297000010604032A0D793969302F33802D636675,201F52565A1E18=1D29350511:11180F5C000102030D332C2E195329711563261F202322,52843A=202C380814:11180370392A0D3329712C2F156375795B5D,450C8A00382E1F20010C=3A0A16222E:11185283847975661271393D692D15565A201E262322,292F060D0C02=30000C1824:111852838470795B302F404533802D152B39201E23221D212726,0F2E1F010D2923=2D39091521:111852838453546319297115030D332B2C,060F8A2E38201F38=0D19253101:111800020D041A796933483E5347446563751F1D212026,010F09150C17=2430000C18:1118000717161A2C2E3371292B56433D6375363F,0F010347208A09=020E1A2632:111800012A0D2C705271292E201F,1538617904=30000C1824:11180001032A0D70795B2C2E302F802D4E152B33714161201F26,520958470A=000C182430:11180001020439332C2E302F2B5844477515634C1F2721,0F520D19267A2971702037=232F3B0B17:111800010206037939695483845D2D2E4E446375661F262120,0F52290D7123=31010D1925:111800010206071979697C67474475664C,0F16298A2014=182430000C:11187129705B79000106032A0D397B6F7C802D2C2B61756627261E0C1D21,0F2E15414732=192531010D:111871545283842979397B7C69152B2A0D3348295324251F1D1E26,6B00702F800C201E=1F2B370713:5D0007363F232227261E21,037C0F471F202E=0E1A263202:6526232227201F,880E=111D293505:653989,8806=131F2B3707:363F6526232227201E89,8832=1A2632020E:1A454F548384,881D=121E2A3606:1A38712975,0F201A=0E1A263202:1A162623227954,0001710F290C=0F1B273303:1A16170F13152654,3852204F32=0F1B273303:1A5D453A332C2E2F4B25262322271F201E1D21,000F704723=2F3B0B1723:3950177089,522E1F0F201A=1D29350511:39701117302F713819297566,004551152C2E201D1F34=121E2A3606:393589,881A=15212D3909:393589,882C=182430000C:393589,8825=101C283404:393589,881C=2531010D19:394089,71294709636F7C440D=0D19253101:3948007889,8D38=2430000C18:394889,8811=111D293505:394889,882A=0E1A263202:3907,8807=0D19253101:39343589,8831=101C283404:393489,8801=222E3A0A16:390050404C89,0F528329692018=131F2B3707:39006A26201F,0F520D38580629712B09=380814202C:390001022C2E302F1575804B2D261F20,0D0F0319707D5229717A15=17232F3B0B:3989,8D11=0A16222E3A:181179838454637566,0F5229012007=111D293505:18117915384C,52200E=0C18243000:1811795B032C2E302F802D4163754C27261E1D2120,010D0F29521F29=16222E0A3A:1811795B5466,01202F=192531010D:181179000607040D03302F5283844F3A45512B1533664C47,090F702E208A2B=0B17232F3B:18117900012C2E5B1F20,0F710D52291A=122A36061E:181179190E332C2E2D52637566262322271F20,8D02=0F1B273303:181117332C2E1526232227201F1E3E,38030F522922=142038082C:181170792C2F7129,52201F=121E36062A:18117001061579,71292023=121E2A3606:18117000012C2E7129,522024=3505111D29:18110F390001020370390D3329711563752E1F0C201D,38525D1A=101C283404:18110F197983842E230C271F1E7A70525463,2620291503=111D293505:1811002E1F8384,0F2022=1824000C30:181100012C2E2F1F,0F3821=142038082C:181100012C2E2F1F20,0F5229=14202C3808:181100015B3875,2E2034=15212D3909:181100012A0D2C2E2F2B2D302F4E447129841F,0F09416138200F=0814202C38:181100012A0D52842953411E20,2E1F0F47152F=131F2B3707:18110001032A0D845B7129302F791533536678,0F208A1F1D33=17232F3B0B:18115452840001712970802D2C2E302F2B2A0D78791F,0F204758610E=0F1B273303:18111A16175B3315262322271F1E201D215D838454433E363F754551,00030F290D=0C18243000:18115C0001702A2C2E2F5283847129795B6375802D154C,1F208A2407=15212D3909:88,262052830D=17232F3B0B:88,8D17=102834041C:88,8D0B=15212D0939:88,8D24=121E2A0636:88,8D09=17232F0B3B:88,8D13=111D293505:1979,3F2F2E45207D37=112935051D:1966583F6589,8831=16222E3A0A:4C4089,880C=0C18243000:4C78,297172380D2A2E0F47484112=16222E3A0A:5C0F1811790070528471291F20,2F0380512514=1C28340410:5C0001020652835B0E03804B2D4E2B752024210C06,292E565A36=1A2632020E:5C11180001027170520D298483292B15200C,03802E386333=15212D3909:89,6B34=111D293505:89,8D', + TIME_YI_JI:'0D28=,2C2E2128=,2C2E0110=,2C2E0C1F=,2C2E7A701B1C=,01022308=,01026D003026=,000106037A702D02=,000106037A702802=,000106037A703131=,000106037A70341B=,000106087A701F0E=,000106087A702E15=,000106087A702C2E0E39=,000106087A702C2E0D2B=,881727=,88032D=,88352F=,882B2F=,882125=,882A22=,880C1E=,880220=,88161A=,882018=,883422=,880113=,880B11=,883315=,882915=,881F17=,88150D=,88122E=,88302A=,88262A=,883A28=,880826=,881C2C=,881905=,882303=,880F09=,88050B=,883701=,882D01=,88060C=,882410=,881A12=,882E0E=,88380E=,881010=,883630=,881834=,880E38=,882232=,882C30=,88043A=,881E0A=,880006=,883208=,880A04=,881400=,882808=,883137=,883B35=,882737=,881D39=,88133B=,880933=,88251D=,882F1B=,881B1F=,88111D=,880719=,88391B=,88212D=,7A702C0B15=,7A70551515=,7A70552D00=,7A7D2C2E1334=382C,000106083528=382C,7A70000106080504=382C7A6C55700F197120,00010608223A=380006082C,01026D0D2C=380006082C,01027A70551D30=380006082C0F71295283,01027A703636=380006082C0F71295283,0102416D1226=380006082C7A706C550F297120,0102251C=380006082C7A6C55700F197120,01026D2300=3800010608,2C2E0324=3800010608,7A702C2E082E=3800010608,7A70552C2E3B34=38000106082C,2F8026330C=38000106082C,2F80267A701622=38000106082C7A70556C0F197120,1904=38000106082C7A6C55700F197120,1514=38000106087A70556C0F197120,2C2E3138=38000106087A70556C0F197120,2C2E0B10=38000106087A6C55700F197120,2C2E2B28=387A6C55700F197120,000106082C2E2E16=38082C,000106037A700E3A=38082C,000106037A703708=38082C6C550F197120,000106037A701B20=38082C6C550F197120,000106037A70111C=38082C6C550F197120,000106037A703A2D=2C38,000106082733=2C38,000106081015=2C38020F71295283,000106083817=2C2920,7A700F03=2C2920,616D1839=2C292070556C100F,00010608161B=2C2920020F7100010608,302B=2C2920556C0F1971,7A701E07=2C2920010F,1B1B=2C2920010670100F00,352B=2C292000010206100F70,082B=2C292000010206100F707A,0C21=2C292000010870556C100F7A,0617=2C29206C0F1971,7A70552807=2C29207A70556C0F197100010206,122F=2C29207A706C55100F1971,1017=2C29207A706C55100F1971,2731=2C20,616D0436=2C2070550F,7A7D01022E12=2C200F71295283,01021831=2C20556C0F1971,7A702912=2C20100F52,01026D1D33=2C807138152952,000106080E31=2C80713815295270556C100F,000106083201=2C80713815295270556C100F7A,000106080327=2C80713815295202100F,000106037A702B2B=2C80713815295202100F,000106037A702801=2C80713815295202100F,000106083639=2C80713815295202100F7A7055,00010608341D=2C807138152952556C100F,000106037A701B23=2C807138152952010F6C55,7A70302D=2C8071381529520102100F7A7055,2231=2C8071381529520102100F7A6C55,1F13=2C80713815295200010206100F20,7A70313B=2C8071381529526C550F,000106037A701A15=2C8071381529527A70550F,000106080219=2C8071381529527A70556C0F19,000106082E0D=2C80713815295208556C100F,000106037A70161F=2C80711529525670556C100F,000106083813=2C80711529525670556C100F,000106082D05=2C807115295256020F7A706C55,2237=2C80711529525602100F,000106081F0D=2C80711529525602100F55,000106037A702627=2C8071152952560102100F7A706C,2C33=2C8071152952560102100F7A706C,0939=2C80711529525601100F7A7055,416D021F=2C80711529525600010206100F70,0E37=2C80711529525600010870556C10,2129=2C8071152952566C550F,7A702519=2C8071152952566C550F19,7A702417=2C8071152952566C55100F19,000106037A70043B=2C8071152952566C55100F19,000106037A700C1B=2C8071152952566C55100F19,7A703B31=2C8071152952566C100F19,7A705500010603172D=2C8071152952567A70550F,416D3A2F=2C8071152952567A70556C100F,1901=2C8071152952567A706C55100F19,1119=2C8071152952567A6C55700F19,1C2B=2C80711529525608556C100F,000106037A701403=2C80711529525608556C100F,000106037A70071D=2C80711529525608100F55,000106037A701908=292C20,7A7D01026D2E0F=292C200102100F7A7055,032C=292C20000608,0102071C=292C206C550F1971,000106037A700E33=292C207A70556C000108,0503=2920550F,7A702C2E0721=2920556C100F,7A702C1225=2920000108556C100F,7A702C2E1F11=2900010870556C100F7A,032C201A11=297A70556C100F,032C200E35=297A70556C100F,032C20000A=70556C0F197120,7A7D3A29=70556C100F2C20,000106081C25=70556C100F2C20,000106082805=70556C100F2C20,000106082F20=70556C100F2C20,00010608150C=70556C100F29522002,7A7D000106033314=70556C100F,00010608032C20122A=70556C08,7A7D000106032415=70100F2C715220,000106081A0D=4B0F2C20,000106037A701902=4B0F2C20,000106080E3B=4B0F20,7A702C000106032E17=0F2C09382920,7A7000010603363B=0F2C093829206C55,000106037A70082C=0F29528320,7A2C71707D01026D0718=0F712952832C20,7A7D01021C26=0F712952832C20,7A7D01026D3918=0F712952832C2038000608,01027A70552126=0F712952832C2010,01021330=0F712952832C207A7055,01021118=0F712952832C207A7055,01023524=0F715220,7A70552C2E3419=20556C0F1971,7A702C2E1D31=2000010206100F,7A702C1E05=0270290F2C207A,00010608212C=0270550F,00010608032C200C23=0270550F,00010608032C203706=0270550F20,000106082C2E2520=0270550F20,7A7D000106032E13=0270550F202C807115295256,000106081620=020F29528320,000106087A2C71707D0112=020F2952832055,7A2C71707D000106030F08=020F20,7A7055000106032A23=020F712952832C20,2521=020F712952832C20,000106082F21=020F712952832C20,000106080003=020F712952832C20,7A700432=020F712952832C2038000106086C,7A701E03=020F712952832C2070556C10,000106081623=020F712952832C2001,2236=020F712952832C2001,000B=020F712952832C2001,7A70552C36=020F712952832C20013800,416D341E=020F712952832C20017055,7A7D0E32=020F712952832C200110,7A7D0329=020F712952832C2001107A706C55,262D=020F712952832C20017A7055,1229=020F712952832C2000010608,122D=020F712952832C2000010608,1011=020F712952832C2000010608,0A0B=020F712952832C2000010608,1F0F=020F712952832C2000010870556C,1A0E=020F712952832C206C55,7A703312=020F712952832C2010,000106037A70172A=020F712952832C2010,7A7055000106033B3B=020F712952832C2010,416D000106037A700B12=020F712952832C20106C55,000106037A700615=020F712952832C207A7055,3203=020F712952832C207A7055,201B=020F712952832C207A706C5510,2023=020F712952832C207A6C7055,2A1B=020F7129528320,000106087A702C2629=020F7129528320,7A702C2E3709=020F7129528320,7A702C000106083A24=020F7129528320,7A70552C2E341A=020F712952832038000106087A70,2C2E1C2D=020F712952832001,7A702C2E0611=020F712952832001,7A702C2E021A=020F712952832001,7A7D2C2E3815=020F71295283200100,7A702C2E3024=020F71295283200110,616D2C2E093B=020F71295283206C55,7A702C2E000106030505=020F71295283206C55,7A702C030C1A=020F71295283207A706C55,000106082C2E3705=020F712952837A706C55,032C201F0C=02550F20,000106037A700508=02550F20,000106037A703029=02550F20,000106087A702C2E3027=02550F202C807115295256,000106037A703526=02100F2C29528320,000106037A70150E=02100F2C29528320,00010608380F=02100F2C29528320,000106083527=02100F2C29528320,7A70000106031C27=02100F2C2955528320,000106081227=02100F2C29555283207A706C,00010608060F=02100F2C29555283207A706C,000106081D34=02100F7020,7A7D000106030F02=02100F7055528315,2F8026000106083920=02100F7055528315,2F802600010608212A=02100F7055528315,000106082A20=02100F7055528315,000106083A26=02100F7055528315,000106080439=02100F7055528315,000106080008=02100F7055528315,000106081B21=02100F7055528315,00010608071B=02100F7055528315,000106080D24=02100F7055528315,000106082C2E2C32=02100F7055528315,000106082C2E2B2C=02100F7055528315,00010608032C201402=02100F7055528315,00010608032C20391C=02100F7055528315,7A7D000106031F10=02100F705552831538,2F8026000106082D06=02100F70555283157A,2F802600010608290D=02100F20,7A702C000106032416=02100F20,616D000106037A702C34=02100F20292C,7A70000106031C2A=02100F528315,7A7055000106032234=02100F528315,7A7055000106032A21=02100F55528315,000106037A703313=02100F55528315,000106037A700509=02100F55528315,000106037A702D03=02100F55528315,000106037A700613=02100F55528315,000106037A702235=02100F55528315,000106037A70391D=02100F55528315,000106037A70100F=02100F55528315,000106087A702C111B=02100F55528315,000106087A702C2E2916=02100F55528315,7A2C71707D000106030430=02100F55528315,7A2C71707D000106033B32=02100F55528315,7A2C71707D000106081903=02100F55528315,7A702C2E000106033A27=02100F55528315,7A702C000106030931=02100F55528315,7A702C000106030C1C=02100F55528315,7A70000106032735=02100F555283152C8071,000106037A700B13=02100F555283152C807138,000106037A701517=02100F555283152C807138,000106037A702917=02100F555283156C,000106037A703136=550F522010,7A2C71707D01022A1E=550F715220,7A702C2E1333=550F715220,7A702C2E000106081405=556C,000106087A702C2E0433=556C,7A70000106083B38=556C0F197120,7A702C2E1E01=556C0F19712001,7A702C2E190B=556C000108,7A70230B=556C000108,7A702C2E1A0F=556C0001082C807115295256,7A701830=556C0008,7A2C71707D01023814=556C100F295220,7A2C71707D03082F=556C100F295220,7A702C0C1D=556C100F295220,7A702C2E00010603021D=556C100F295220,7A70000106031121=556C100F2952202C,7A701835=556C100F2952202C80713815,000106037A703B30=556C100F29522002,000106037A70290C=556C100F29522002,7A70000106030930=556C100F2952200238,000106037A702B27=556C100F2952200102,7A702C2E3812=556C08,000106037A701012=556C08,000106037A701621=556C08,7A702C2E000106033209=556C08,7A702C2E000106032021=556C082C807138152952,000106037A700009=556C082C807138152952,000106037A702A1D=807138152952000170100F,032C200A05=807138152952000170100F,032C20273B=8071381529527A706C550F,032C203423=80711529525600010870556C100F,032C201511=80711529525600010870556C100F,032C20183B=80711529525600010870556C100F,032C203311=010F2C80093829206C55,7A702B29=010F2C80093829206C55,7A70616D3A25=010F2C09382920,7A70550825=010F2C093829207A6C5570,201E=010F09382920,7A702C2E352E=010670100F2C71522000,1C28=010670100F7152207A6C55,2C2E2E11=0106100F7152,7A70032C203205=0106100F71526C,7A70032C202A19=0102290F20,7A702C2E2A1F=010270290F2C207A6C55,2413=010270290F2C207A6C55,0437=010270290F2C207A6C55,0935=010270550F,032C201B18=010270550F20,2B24=010270550F20,2F80261906=010270550F20,2C2E2732=010270550F20,2C2E071A=010270550F20,2C2E3700=010270550F20,7A7D1724=010270550F203800,2F80263921=010270550F202C29,416D290F=010270550F202C807138152952,1619=010270550F202C8071381529527A,3207=010270550F202C80711529525600,0829=010270550F2000,060D=010270550F2000,0001=010270550F2000,2736=010270550F207A,1B1E=010270550F207A,2C2E140B=010270550F207A6C,0114=010270550F7A6C,032C202C3B=010270550F7A6C,032C20201F=0102550F20,7A702C1A13=0102550F20,7A702C3637=0102550F20,7A702C280B=0102550F20,7A702C223B=0102550F20,7A702C032D04=0102100F2C29528320,7A701409=0102100F2C29528320,7A70552307=0102100F2C2952832000,0005=0102100F295283,032C207A700A00=0102100F2955528320,7A2C71707D082D=0102100F2955528320,7A702C2E2809=0102100F295552832000,7A702C2E2B2D=0102100F7055528315,021E=0102100F7055528315,0C20=0102100F7055528315,2F80263420=0102100F7055528315,2F80261510=0102100F7055528315,2F80262E10=0102100F7055528315,2F80262806=0102100F7055528315,2F80263134=0102100F7055528315,2F80261D38=0102100F7055528315,2F8026251A=0102100F7055528315,2F80263A2A=0102100F7055528315,2F80267A7D1120=0102100F7055528315,2F80267A7D0824=0102100F7055528315,2C2E1E00=0102100F7055528315,2C2E7A2F1D=0102100F7055528315,032C200A06=0102100F7055528315,7A7D2C2E1C2E=0102100F70555283153800,2F80261832=0102100F70555283153800,2C2E280A=0102100F70555283153800,2C2E320A=0102100F705552831538007A,2738=0102100F705552831538007A6C,2F80260720=0102100F705552831538007A6C,2F8026032B=0102100F70555283152C292000,1907=0102100F70555283152C292000,3703=0102100F70555283152C292000,2739=0102100F70555283152C29207A,251B=0102100F70555283152C29207A,2B25=0102100F70555283152C29207A6C,1331=0102100F70555283152C207A,0D29=0102100F70555283152C80717A,1B1D=0102100F70555283158071,032C200D2D=0102100F705552831500,1725=0102100F705552831500,352D=0102100F705552831500,0C19=0102100F705552831500,150F=0102100F705552831500,3025=0102100F705552831500,0F07=0102100F705552831500,1E09=0102100F705552831500,251F=0102100F705552831500,010C=0102100F705552831500,2F80261A10=0102100F705552831500,2F80261016=0102100F705552831500,2F80260934=0102100F705552831500,2F80262910=0102100F705552831500,2F80267A7D1A14=0102100F705552831500,2C2E2304=0102100F705552831500,7A7D3421=0102100F7055528315002C2920,212F=0102100F7055528315002C807138,111F=0102100F7055528315002C807138,3135=0102100F7055528315008071,032C200828=0102100F7055528315007A6C,2022=0102100F70555283156C,7A7D140A=0102100F70555283156C,7A7D2C2E2127=0102100F70555283157A,1618=0102100F70555283157A,0B0F=0102100F70555283157A,1836=0102100F70555283157A,172E=0102100F70555283157A,2F8026352A=0102100F70555283157A,2F80262B2E=0102100F70555283157A,2F8026082A=0102100F70555283157A,2F80262306=0102100F70555283157A,2F80263702=0102100F70555283157A,2F80262C38=0102100F70555283157A,2F80261E06=0102100F70555283157A,2F80261B1A=0102100F70555283157A,2F8026032A=0102100F70555283157A,2C2E1F14=0102100F70555283157A,2C2E3810=0102100F70555283157A,2C2E262C=0102100F70555283157A29,032C20201A=0102100F70555283157A00,2F80260A02=0102100F70555283157A00,2F80261838=0102100F70555283157A6C,2F80260E34=0102100F70555283157A6C,2F80260438=0102100F70555283157A6C,2C2E2F1A=0102100F70555283157A6C,2C2E2305=0102100F528315,7A70553525=0102100F5283152C8071,7A70550723=0102100F528315807138,7A7055032C200D2A=0102100F55528315,2F80267A2C71707D3316=0102100F55528315,2F80267A2C71707D1224=0102100F55528315,2F80267A2C71707D212E=0102100F55528315,2F80267A700616=0102100F55528315,2F80267A70380C=0102100F55528315,2F80267A700434=0102100F55528315,2F80267A702A18=0102100F55528315,7A2C71707D2628=0102100F55528315,7A2C71707D100C=0102100F55528315,7A2C71707D2F80261729=0102100F55528315,7A701F15=0102100F55528315,7A70240E=0102100F55528315,7A703632=0102100F55528315,7A701339=0102100F55528315,7A700115=0102100F55528315,7A702C2C37=0102100F55528315,7A702C320B=0102100F55528315,7A702C3206=0102100F55528315,7A702C2E2238=0102100F55528315,616D2F80267A2C71707D3816=0102100F555283153800,2F80267A701406=0102100F555283153800,2F80267A700111=0102100F555283152C8071,7A700501=0102100F555283152C8071,7A70370B=0102100F555283152C807138,7A703B37=0102100F555283152C80713800,7A701C2F=0102100F555283152920,7A702C240F=0102100F555283152920,7A702C0A03=0102100F555283152920,7A702C0221=0102100F55528315292000,7A702C2E3317=0102100F55528315292000,7A702C2E3634=0102100F5552831500,2F80267A2C71707D3028=0102100F5552831500,7A2C71707D111A=0102100F5552831500,7A2C71707D071E=0102100F5552831500,7A2C71707D2913=0102100F5552831500,7A702F19=0102100F5552831500,7A702301=0102100F5552831500,7A702C3919=0102100F5552831500,7A702C3B33=0102100F5552831500,7A702C2E0223=0102100F5552831500,7A702C03032F=0102100F55528315006C,7A702C2E262E=0102100F555283156C,2F80267A70032E=0102100F555283156C,7A2C71707D0F0B=0102100F555283156C,7A701D3B=0102100F555283156C,7A702C2E030116=01100F1571292C20,2F80267A703200=01100F1571292C20,7A7055370A=01100F1571292C2000,7A701B22=01100F1571292C2000,7A701E04=01100F1571292C2000,416D1336=01100F1571292C20007A70556C,391A=01100F1571292C20007A6C7055,1C24=01100F1571292C207A7055,2F80260D2E=01100F15712920,7A702C2E2D0A=01100F15712920,7A702C2E2800=01100F15712920027A7055,2C2E251E=01100F157129207A70556C,2C2E1228=01100F157129207A70556C,416D2C2E050A=01100F5220,7A70550000=01100F5220,616D2624=01100F5220,616D2F80267A702804=01100F5220006C,7A70550F06=01100F52207A70556C,2C2E2F1E=01100F52207A70556C,2C2E1014=01100F527A70556C,032C20161E=01100F712920,7A702C2E0A0A=01100F71522C2920,616D161C=0070100F292C20,01020F04=0006100F7020,7A7D01026D183A=0006100F7020,616D0102201C=0006100F20,7A2C71707D01026D1D37=000170100F292C20,2F18=000170100F292C802038,161D=00014B0F,032C201338=00014B0F2C2002,2F80261728=00014B0F20,2C2E0F0A=00014B0F20,7A2C71707D1833=00014B0F20,7A702C1407=00014B0F20,7A702C1401=0001060838,2C2E1123=0001060838,416D032C202019=000106082C38,2C31=000106082C38,391F=000106082C38,2523=000106082C38,7A70416D1C29=000106082C38020F71295283,3811=000106082C38020F71295283,7A700937=000106082C386C550F197120,7A700117=00010252100F29202C7A706C55,1337=00010206700F202C807138152952,3A2E=00010206100F7020,616D0610=00010206100F20,7A2C71707D0328=00010206100F20,7A700F01=00010206100F20,7A702C3310=00010206100F20,7A702C2E3139=0001100F298020,7A702C2625=00010870556C100F2C20,1909=00010870556C100F2C20,391E=00010870556C100F2C20,2124=00010870556C100F2C20,2F80267A7D0F00=00010870556C100F2C2038,2D09=00010870556C100F2C2002,0500=00010870556C100F2C207A,2C39=00010870556C100F2C207A,2518=00010870556C100F2C207A,0B0C=00010870556C100F2C207A,2F80262911=00010870556C100F7A,032C200007=000108556C100F2C2029,7A700A07=000108556C100F2C2029,7A701332=000108556C100F20,2C2E7A70100D=000108556C100F20,7A702C2E2239=000108556C100F20,7A702C2E0A01=000108556C100F20,7A702C2E380D=0001086C100F2C20,7A70551D36=0001086C100F2C20,7A70552F1F=000108100F70552920,010D=000108100F70552920,616D0507=000108100F705529202C80713815,0B0D=000108100F705529202C8071157A,3133=000108100F7055292002,2309=000108100F7055292002,416D0002=000108100F705529207A,2F80263202=000108100F705529207A,2F80263638=000108100F705529207A,2C2E2A1A=000108100F705529207A38,2F80262414=000108100F705529207A6C,2C2E2E14=000108100F552920,7A2C71707D1404=000108100F552920,7A2C71707D0B17=000108100F552920,7A70330D=000108100F552920,7A702C172F=000108100F552920,7A702C2E3707=000108100F5529206C,616D7A702C2E302E=6C55700F197120,2C2E7A7D0C22=6C55700F197120,7A7D01026D1E02=6C550F297120,000106037A703923=6C550F297120,7A702C2E03230A=6C550F1920,7A2C71707D240C=6C550F19200210,7A2C71707D000106031A16=6C550F197120,000106037A701513=6C550F197120,7A703A2B=6C550F197120,7A701837=6C550F197120,7A702F23=6C550F197120,7A702F22=6C550F197120,7A702D07=6C550F197120,7A702C2E3922=6C550F197120,7A700102093A=6C550F197120,7A70000106031B19=6C550F197120,616D7A70071F=6C550F197120,616D7A702C2E212B=6C550F197120,616D7A702C2E000106032734=6C550F197120292C,000106037A700325=6C550F1971200001020610,7A702C122B=6C550F19712008,000106037A702411=6C100F2952,7A7055032C20010E=100F2C29528320,01023704=100F2C29528320,0102363A=100F292C206C55,000106037A702B26=100F2920,7A2C71707D01026D302C=100F7055528315,01021E08=100F7055528315,01022730=100F7055528315,01021512=100F7055528315,010200352C=100F7055528315,7A7D01026D2F1C=100F7055528315,7A7D01026D0222=100F70555283153800,01026D2412=100F70555283157A,01022230=100F70555283157A,0102060E=100F70555283157A6C,01022C3A=100F70555283157A6C,01026D1F12=100F1571292C20,01026D3B36=100F1571292C20,01026D1516=100F1571292C20,000106037A702302=100F1571292C20,000106037A701D32=100F1571292C20,000106082F8026330E=100F1571292C20,000106086D2A1C=100F1571292C20,7A7001026D313A=100F1571292C20,7A7000010603341C=100F1571292C20,416D7A70000106032B2A=100F1571292C2002,000106037A700326=100F1571292C20556C,000106037A70273A=100F1571292C2000,01026D0722=100F1571292C2000,01026D2E0C=100F1571292C206C55,000106037A701408=100F1571292C207A706C55,01022020=100F1571292C207A706C55,000106081726=100F1571292C207A6C7055,0102290E=100F1571292C207A6C7055,000106080932=100F1571292C207A6C7055,000106080D26=100F52,00010608032C20100E=100F5283153800,01027A70550B16=100F5220,2F8026000106081122=100F5220,6D010200133A=100F5220,01026D1F16=100F5220,000106037A703132=100F5220,000106083B3A=100F5220,000106082522=100F5220,00010608190A=100F5220,000106082C2E021C=100F5220,7A70000106030936=100F52202C,01026D3A2C=100F52206C55,01027A701A0C=100F52206C55,000106037A700E30=100F52206C55,000106037A700A08=100F52207A706C55,000106083204=100F52207A6C5570,01026D0B0E=100F55528315,01027A2C71707D0004=100F55528315,7A2C71707D01026D1D3A=100F55528315,7A2C71707D01026D3418=100F5552831500,7A2C71707D0102201D=100F712920,7A702C2E00010608030E36=100F71522C2920,01023635=100F715229,00010608032C20021B=7A70550F2C715220,1900=7A70550F715220,2C2E0A09=7A70556C,00010608172C=7A70556C,00010608032C200B14=7A70556C,00010608032C202914=7A70556C0F197120,2C2E0938=7A70556C0F197120,000106082C2E111E=7A70556C000108,0502=7A70556C000108,2F80260D2F=7A70556C0001082C807138152952,2D0B=7A70556C0001082C807138152952,3633=7A70556C0001082C807115295256,0C18=7A70556C0008,01020218=7A70556C0008,0102302F=7A70556C100F295220,000106082C35=7A70556C100F295220,000106081E0B=7A70556C100F2952202C807115,3130=7A70556C100F29522002,000106080506=7A70556C100F29522001,2C2E330F=7A70556C100F29522001022C8071,010F=7A70556C100F295220010200,0435=7A70556C100F295280713815,032C200614=7A70556C100F295201,032C20122C=7A70556C100F29520102,032C203B39=7A706C550F297120,0F05=7A706C550F297102,032C200D25=7A706C550F19712001,616D2233=7A706C550F19712000010608,2626=7A6C70550F197120,01021A17=7A6C70550F197120,00010608262F=7A6C70550F1971202C29,000106083529=7A6C70550F19712002,616D000106082D08=7A6C70550F197120103800,0102341F=7A6C55700F197120,2C2E172B=082C38,7A7055000106030D27=082C38,7A70000106030827=08556C100F2C20,000106037A702803=08556C100F2C20,000106037A701013=08556C100F2C20,7A7000010603262B=08556C100F2C20,7A7000010603240D=08556C100F2C20,7A70000106033631=08556C100F2C20,7A70000106030431=08556C100F20,7A702C2E000106031D35=08100F552920,000106037A701335=08100F552920,000106037A700612=08100F55292038,000106037A70', + SHEN_SHA:['无','天恩','母仓','时阳','生气','益后','青龙','灾煞','天火','四忌','八龙','复日','续世','明堂','月煞','月虚','血支','天贼','五虚','土符','归忌','血忌','月德','月恩','四相','王日','天仓','不将','要安','五合','鸣吠对','月建','小时','土府','往亡','天刑','天德','官日','吉期','玉宇','大时','大败','咸池','朱雀','守日','天巫','福德','六仪','金堂','金匮','厌对','招摇','九空','九坎','九焦','相日','宝光','天罡','死神','月刑','月害','游祸','重日','时德','民日','三合','临日','天马','时阴','鸣吠','死气','地囊','白虎','月德合','敬安','玉堂','普护','解神','小耗','天德合','月空','驿马','天后','除神','月破','大耗','五离','天牢','阴德','福生','天吏','致死','元武','阳德','天喜','天医','司命','月厌','地火','四击','大煞','大会','天愿','六合','五富','圣心','河魁','劫煞','四穷','勾陈','触水龙','八风','天赦','五墓','八专','阴错','四耗','阳错','四废','三阴','小会','阴道冲阳','单阴','孤辰','阴位','行狠','了戾','绝阴','纯阳','七鸟','岁薄','阴阳交破','阴阳俱错','阴阳击冲','逐阵','阳错阴冲','七符','天狗','九虎','成日','天符','孤阳','绝阳','纯阴','六蛇','阴神','解除','阳破阴冲'], + DAY_SHEN_SHA:'100=010203040506,0708090A0B101=010C0D,0E0F101112131415102=16011718191A1B1C1D1E,1F20212223103=24011825261B271D1E,28292A2B104=012C2D2E2F3031,3233343536105=3738,393A3B3C3D123E106=3F404142434445,464748107=494A4B4C4D,4E108=4F5051524C4D5345,54555657109=58595345,5A5B12565C10A=5D415E5F60,616263640B6510B=0266676869,6A6B6C0A3E6D10C=1602171803041B05061E,07086E10D=24181B0C0D,0E0F1011126F13141510E=70191A1C1D,1F2021222310F=0125261B271D,28292A2B110=012C2D2E2F3031,3233343536111=49013738,393A3B3C3D123E112=4F50013F404142434445,4648113=014A4B,4E6E114=51524C4D5345,54550B5657115=0158595345,5A5B12565C116=1601185D415E5F60,61626364117=24021867681B69,6A6B3E6D118=0203040506,0708119=1B0C0D,0E0F10111213141511A=191A1B1C1D1E,1F2021222311B=4925261B271D1E,28292A11C=4F502C2D2E2F3031,323334353611D=3738,393A3B3C3D123E11E=3F404142434445,460B4811F=4A4B,4E71120=16171851524C4D5345,545556121=241858595345,5A5B12565C122=5D415E5F60,61626364123=0267681B69,6A6B3E6D124=0203041B05061E,070847125=491B0C0D,0E0F101112131415126=4F50191A1C1D1E,1F20212223127=2526271D1E,28292A2B128=2C2D2E2F3031,32333435360B129=3738,393A3B3C3D123E12A=1617183F404142434445,464812B=24184A4B,4E7212C=51524C4D53,5455565712D=0158595345,5A5B12565C12E=015D415E5F60,616263647312F=49010267681B69,6A6B3E6D130=4F500102030405061E,070874131=010C0D,0E0F101112131415726E132=191A1C1D1E,1F2021220B722375133=2526271D1E,28292A2B134=1617182C2D2E2F3031,3233343536135=24183738,393A3B3C3D126F3E136=3F4041424344,4648137=4A4B,4E72138=51524C4D5345,545576567257139=4958595345,5A5B7612565C7713A=4F505D415E5F60,6162636413B=02676869,6A6B3E6D200=1601025D60,393B28292A11090A201=0103041A1B4A,123435360B6D202=011819681B4C1D061E,3D1014203=011718252F591D0D1E,1F20213233204=012C26,3C23205=493751522D2E69,121364223E2B206=503F4005311E,6A3A5A5B207=5841440C38,4615208=431C4D45,6B4E5648209=27534B45,545507086162125620A=16666730,0E0F635720B=0241425E5F1B,6C0A0B3E5C20C=02185D1B601E,393B28292A116E20D=171803041B4A,126F3435366D20E=7019684C1D06,3D101420F=4901252F591D0D,1F2021323378210=50012C26,3C23211=013751522D2E69,121364223E2B212=013F40053145,6A3A5A5B213=015841440C38,46156E214=16431C4D5345,6B4E5648215=27534B45,545507086162120B5648216=18671B30,0E0F6357217=02171841425E5F1B,3E5C218=025D60,393B28292A11219=4903041A1B4A,123435366D21A=5019681B4C1D061E,3D101421B=252F591D0D45,1F2021323321C=2C26,3C2321D=3751522D2E69,121364223E2B21E=163F40053145,6A3A5A5B21F=5841440C38,467147150B220=18431C4D5345,6B4E5648221=171827534B45,5455070861621256222=6730,0E0F6357223=490241425E5F1B,3E5C224=50025D1B601E,393B28292A11225=03041A4A,123435366D226=19684C1D061E,3D1014227=252F591D0D1E,1F20213233228=162C26,3C23229=3751522D2E69,121364220B3E2B22A=183F40053145,6A3A5A5B22B=17185841440C38,46157222C=431C4D53,6B4E564822D=490127534B45,54550708616212567922E=5001671B30,0E0F635722F=010241425E5F,3E5C230=01025D601E,393B28292A1174231=0103041A4A,1234353647726E6D232=1619684C1D061E,3D1014233=252F591D0D1E,1F202132330B75234=182C26,3C23235=17183751522D2E69,126F1364223E2B236=3F400531,6A3A5A5B237=495841440C38,461572238=50431C4D5345,6B4E76567248239=27534B45,5455070861627612567323A=6730,0E0F635723B=0241425E5F,3E5C300=0102415E5F1A1B69,090A471457301=011B05,6A125C302=5001185D19515203042F0C1D601E,323315303=4F490118251C1D1E,3C5A5B106D304=012C2706,1F20213B710B787A305=58372668300D,6B123E306=173F402D2E45,07086423307=00,393A0E2B308=24164142444A533145,61624622567B309=674C533845,28292A4E12135630A=431B594D,5455633435364830B=021B27,3D116C0A3E30C=500218415E5F1A1B691E,146E5730D=4F49181B05,6A126F5C30E=705D19515203042F0C1D60,3233150B30F=01251C1D,3C5A5B106D310=01172C2706,1F20213B7C311=0158372668300D,6B123E312=2416013F402D2E45,0708476423313=01,393A0E0F6E2B314=4142444A533145,61624622567D315=66671B4C533845,28292A4E121356316=5018431B594D,54556334353648317=4F4902181B4B,3D113E318=02415E5F1A69,140B57319=1B05,6A125C31A=175D19515203042F0C1D601E,32331531B=251C1D1E,3C5A5B106D31C=24162C2706,1F20213B31D=58372668300D,6B123E31E=3F402D2E45,0708642331F=00,393A0E0F2B320=50184142444A533145,61624622567E321=4F4918671B4C533845,28292A4E121356322=43594D,5455633435360B48323=021B4B,3D113E324=0217415E5F1A691E,1457325=05,6A125C326=58165D19515203042F0C1D601E,323315327=251C1D1E,3C5A5B106D328=2C2706,1F20213B75329=58372668300D,6B123E32A=50183F402D2E45,0708642332B=4F4918,393A0E0F722B32C=4142444A5331,616246220B567B32D=01671B4C533845,28292A4E12135632E=011743594D,5455633435364832F=01024B,3D113E330=24160102415E5F1A691E,741457331=0105,6A12726E5C332=5D19515203042F0C1D601E,32331572333=251C1D1E,3C5A5B106D334=50182C2706,1F20213B335=4F491858372668300D,6B126F3E336=3F402D2E,0708640B23337=00,393A0E0F722B338=174142444A533145,616246762256727B73339=674C533845,28292A4E7612135633A=241643594D,5455633435364833B=024B,3D113E400=5001431B,5A5B1248401=490141425E5F2F4B,32336314402=4F01024A1D1E,396B3C130B57403=01025803044C1D1E,07085C404=01183F5D5960,0E0F10127F405=171819,1F20213E6D788075406=162526690645,28292A407=242C2D2E050D,6162343536647B408=3767680C5345,6A3A3B3D12155623409=4041441C5345,46562B40A=501B274D31,4E1140B=4951521A1B3038,5455223E40C=4F431B1E,5A5B0981120B6E4840D=41425E5F2F4B,3233631440E=02184A1D,396B3C135740F=010217185803044C1D,0708475C410=16013F585960,0E0F1012411=240119,1F20213E6D412=012526690645,28292A413=012C2D2E050D,6162343536646E7B414=503767681B0C5345,6A3A3B3D126F155623415=494041441B1C5345,46562B416=4F1B274D31,4E11710B417=51521A1B3038,54556C81223E418=18431B,5A5B1248419=171841425E5F2F4B,3233631441A=16024A1D1E,396B3C135741B=24025844044C1D1E,07085C41C=3F5D5960,0E0F101241D=19,1F20213E6D41E=50702526690645,28292A41F=492C2D2E050D,6162343536647D420=4F663767681B0C5345,6A3A3B3D12150B5623421=4041441B1C5345,46562B422=181B274D31,4E11423=171851521A3038,5455223E424=16431E,5A5B1248425=2441425E5F2F4B,32336314426=024A1D1E,396B3C1357427=025803044C1D1E,07085C428=503F5D5960,0E0F10126F429=4919,1F20213E6D42A=4F2526690645,28292A0B8242B=2C2D2E050D,616234353664727E7342C=183767681B0C53,6A3A3B3D1215562342D=0117184041441C5345,4647562B42E=1601274D31,4E1142F=240151521A3038,5455223E430=01431E,5A5B761248431=0141425E5F2F4B,32336314726E432=50024A1D1E,396B3C137257433=49025844044C1D1E,0708745C434=4F3F5D5960,0E0F10120B435=19,1F20213E6D75436=1825266906,28292A82437=17182C2D2E050D,616234353664727B73438=163767680C5345,6A3A3B3D1215567223439=244041441C5345,46562B43A=274D31,4E1143B=51521A3038,545576223E83500=012F4D31,54550708323312501=01586938,0E0F3C63502=16010241435E5F051D1E,641448503=01020C1D4B1E,6A28292A353615220B504=0117183F03041C,123457505=181927,3D103E5C506=5D25306045,1F20213B616213507=492C2667,6D508=503751522D2E530645,1256509=401B4A530D45,393A5A5B115650A=4142441A1B4C,462350B=681B59,6B4E3E2B50C=162F4D311E,5455070832330981126E50D=586938,0E0F3C0B50E=02171841435E5F051D,64144850F=0102180C1D4B,6A28292A35361522510=013F03041C,123457511=49011927,3D103E5C512=50015D25306045,1F20213B616213513=012C26671B,6E6D514=3751522D2E1B530645,126F56515=401B4A530D45,393A5A5B1156516=164142441A1B4C,467123517=6859,6B4E6C810B3E2B518=17182F4D31,54550708323312519=18586938,0E0F3C6351A=0241435E5F051D1E,64144851B=49020C1D4B1E,6A28292A3536152251C=503F03041C,12345751D=1927,3D103E5C51E=705D25306045,1F20213B61621351F=2C26671B,6D520=163751522D2E1B530645,1256521=404A530D45,393A5A5B110B56522=17184142441A1B,4623523=186859,6B4E3E2B524=2F4D311E,54550708323312525=49586938,0E0F3C63526=500241435E5F051D1E,641448527=020C1D4B1E,6A28292A35361522528=3F03041C,126F344757529=1927,3D103E5C52A=165D25306045,1F20213B616213658452B=662C2667,0B726D52C=17183751522D2E1B5306,125652D=0118404A530D45,393A5A5B115652E=014142441A4C,462352F=49016859,6B4E3E2B530=50012F4D311E,545507083233761285531=01586938,0E0F3C63726E532=0241435E5F051D1E,64147248533=020C1D4B1E,6A28292A7435361522534=163F03041C,123457535=1927,3D100B3E5C536=16185D253060,1F20213B61621378537=182C2667,726D538=3751522D2E530645,125672539=49404A530D45,393A5A5B115653A=504142441A4C,46472353B=681B59,6B4E763E2B600=241601304D,3C28292A4E1235361423601=01,54553B63342B602=0102681D311E,3D603=010241425E5F4A1D381E,64604=01183F434C,39127148605=4F49181951520304594B,61620B3E73606=50256745,5A5B102257607=172C69,1F20215C608=5D37261B05536045,6B111256609=402D2E1A1B0C5345,6B11125660A=24161B1C06,6A3A0E0F1360B=5841442F270D,3233463E60C=304D1E,3C28292A4E0981123536146E2360D=00,54553B63342B60E=0218681D31,3D60F=4F4901021841425E5F4A1D38,640B610=50013F434C,391248611=01171951520304594B,61623E612=0125671B45,5A5B102257613=012C1B69,1F20216E5C614=24165D37261B05536045,6B11126F56615=402D2E1A1B0C5345,070815566D616=1C06,6A3A0E0F1347617=5841442F270D,3233466C813E618=18304D,3C28292A4E1235361423619=4F4918,54553B63340B2B61A=5002681D311E,3D61B=021741425E5F4A1D381E,6461C=3F434C,39124861D=1951520304594B,61623E61E=24167025671B45,5A5B10225761F=2C1B69,1F20215C620=5D372605536045,6B111256621=402D2E1A0C5345,070815566D622=181B1C06,6A3A0E0F13623=4F49185841442F270D,3233460B3E624=50304D1E,3C28292A4E1235361423625=17,54553B63342B626=02681D311E,3D627=0241425E5F4A1D381E,64628=24163F434C,39126F48629=1951520304594B,61623E62A=256745,5A5B1022578662B=2C69,1F2021725C7562C=185D37261B055360,6B11125662D=4F490118402D2E1A0C5345,0708150B566D62E=50011C06,6A3A0E0F1362F=01175841442F270D,3233463E630=01304D1E,3C28292A4E761235361423631=01,54553B6334726E2B87632=241602681D311E,3D72633=0241425E5F4A1D381E,7464634=3F434C,39124748635=1951520304594B,61623E6573636=661825671B,5A5B10225786637=4F49182C69,1F20210B725C75638=505D372605536045,6B11125672639=17402D2E1A0C5345,070815566D63A=1B1C06,6A3A0E0F1363B=5841442F270D,323346763E700=0103404142445906,46701=01020D,4E14702=50015152694D1D1E,54553B23703=4901051D1E,5A5B2B1288704=4F0102415E5F0C31,6162636415705=6667681C38,6A6B3E706=4303042745,07080B48707=02304B,0E0F101112708=16171819,1F20135657709=24185825261B5345,28292A353622565C70A=025D2C2D2E2F4A60,3233893470B=374C,393A3C3D3E6D70C=503F4041424459061E,466E70D=49020D,4E1470E=4F5152694D1D,54553B70F=01051D,5A5B12132B710=0102415E5F0C31,61626364150B65711=0167681C38,6A6B3E712=162417184303041B2745,070848713=240102181B304B,0E0F1011126E714=191A1B5345,1F20215657715=5825261B5345,28292A353622565C717=49374C,393A3C3D126F473E6D718=4F3F404142445906,46719=020D,4E1471A=515269,1D1E71B=051D1E,5A5B12132B71C=16021718415E5F0C31,616263641571D=241867681B1C38,6A6B3E71E=4303041B2745,07084871F=021B30,0E0F101112720=50191A5345,1F20215657721=495825265345,28292A353622565C722=4F025D2C2D2E2F4A60,32338934723=374C,393A3C3D123E6D724=3F4041424459061E,46098A0B725=020D,4E7114726=1617185152694D1D1E,54553B23727=2418051D1E,5A5B12132B728=02415E5F0C31,616263641573729=67681B1C38,6A6B3E72A=504303042745,07084872B=4902304B,0E0F1011126F7272C=4F70191A1B,1F2021565772D=015825265345,28292A353622565C72E=01025D2C2D2E2F4A60,323389340B72F=01374C,393A3C3D6C8A123E6D730=160117183F4041424459061E,46731=240102180D,4E14726E732=5152694D1D1E,54553B767223733=051D1E,5A5B7612132B77734=5002415E5F0C31,6162636415735=4967681C38,6A6B473E736=4F4303041B27,7448737=02304B,0E0F10111272738=191A5345,1F20210B56725775739=5825265345,28292A353622565C73A=160217185D2C2D2E2F4A60,3233893473B=2418374C,393A3C3D123E6D800=50013F5D402760,6A3A5A5B22801=490102414430,466D802=014D1D061E,6B4E4714803=011D0D1E,54550708616212804=0102671B4A,0E0F6323805=41425E5F4C,8B2B806=16593145,3928292A113536807=025803041A1B38,1234130B808=181943681B695345,3D105648809=1718252F0553534B45,1F20213B32335680A=50022C260C,3C155780B=493751522D2E1C,12643E5C80C=3F5D4027601E,6A3A5A5B226E80D=02414430,466D80E=4D1D06,6B4E1480F=011D0D,5455070861621279810=16010266674A,0E0F6323811=0141425E5F1B4C,0B3E2B812=01181B593145,3928292A113536813=010217185803041A1B38,1234136E814=501943681B695345,3D105648815=49252F05534B45,1F20213B323356816=022C260C,3C1557817=3751522D2E1C,126F643E5C818=3F5D402760,6A3A5A5B22819=02414430,466D81A=164D1D061E,6B4E1481B=1D0D1E,545507086162120B6581C=0218671B4A,0E0F632381D=171841425E5F1B4C,3E2B81E=501B593145,3928292A11353681F=49025D03041A38,123413820=194368695345,3D10475648821=252F05534B45,1F20213B323356716=50025D2C2D2E2F4A60,32338934822=022C260C,3C1557823=3751522D2E1C,12643E5C824=163F5D4027601E,6A3A5A5B098A22825=02414430,46710B6D826=184D1D061E,6B4E14827=17181D0D1E,54550708616212828=5002671B4A,0E0F6323829=4941425E5F4C,3E2B82A=593145,3928292A11353682B=025803041A38,126F34137282C=701943681B6953,3D10564882D=01252F05534B45,1F2021613233567882E=1601022C260C,3C155782F=013751522D2E1C,6C8A12640B3E5C830=01183F5D4027601E,6A3A5A5B22831=01021718414430,46726E6D832=504D1D061E,6B4E761472833=491D0D1E,545507086162761273834=02674A,0E0F6323835=41425E5F4C,3E2B836=1B5931,3928292A11743536837=025803041A38,12341372838=16194368695345,3D10567248839=252F05534B45,1F20213B32330B567583A=02182C260C,3C155783B=17183751522D2E1C,12643E5C900=013F408C2E4C,0708641457901=010259,393A0E0F5C902=2416015D4142441D601E,61624635367B903=0167691D1E,28292A4E126D904=01021B054D06,5455637134220B905=580C0D,3D11153E906=17415E5F1A1B1C45,23907=4F49021B27,6A3B12472B908=501819515203042F30533145,323356909=1825533845,3C5A5B105690A=022C43,1F2021487C90B=3726684A4B,6B12133E90C=24163F402D2E4C1E,070864146E5790D=0259,393A0E0F5C90E=5D4142441D60,61624635360B7B90F=0167691D,28292A4E126D910=0102171B054D06,5455633422911=4F4901581B0C0D,3D11153E912=500118415E5F1A1B1C45,23913=0102181B27,6A3B126E2B914=19515203042F30533145,323356915=25533845,3C5A5B1056916=2416022C43,1F202148917=3726684A4B,6B126F133E918=3F402D2E4C,070864140B57919=0259,393A0E0F5C91A=175D4142441D601E,61624635367D91B=4F4966671B691D1E,28292A4E126D91C=5002181B054D06,545563342291D=18581B0C0D,3D11153E91E=415E5F1A1C45,2391F=0227,6A3B122B920=241619515203042F305331,323356921=25533845,3C5A5B1056922=022C43,1F20210B48788D923=3726684A4B,6B12133E924=173F402D2E4C1E,0708098A641457925=4F49022E,393A0E0F475C926=50185D4142441D601E,61624635367E927=18671B691D1E,28292A4E126D928=02054D06,5455633422929=580C0D,3D11153E92A=2416415E5F1A1C45,2392B=0227,6A3B126F722B92C=7019515203042F305331,32330B5692D=0125533845,3C5A5B105692E=0102162C43,1F2021487592F=4F49013726684A4B,6B6C8A12133E930=5001183F402D2E4C1E,0708641457931=01021859,393A0E0F726E5C932=5D4142441D601E,616246763536727B73933=67691D1E,28292A4E76126D934=241602054D06,5455633422935=580C0D,3D11153E936=415E5F1A1B1C,740B23937=0227,6A3B12722B938=1719515203042F30533145,32335672939=4F4925533845,3C5A5B105693A=5002182C43,1F20214893B=183726684A4B,6B12133EA00=160170182543261C,28292A48A01=240117182C2D2E274B,61623464147BA02=013F376768301D1E,6A3A3D1257A03=01584041441D1E,465CA04=015D4D60,4E1113A05=4951521A1B4A,54553E6DA06=4F501B4C0645,5A5B12A07=41425E5F2F590D,32336322A08=025345,396B3C0B5623A09=020304695345,0708562BA0A=16180531,0E0F10126FA0B=241618190C38,1F20213B3536103EA0C=2543261C1E,28292A6E48A0D=2C2D2E274B,61623464147BA0E=3F376768301D,6A3A3D124757A0F=4924584041441B1D,465CA10=4F50015D1B4D60,4E1113A11=0151521A1B4A,54553E6DA12=011B4C0645,5A5B120BA13=0141425E5F2F590D,323363226EA14=1602185345,396B3C5623A15=240217180304695345,0708562BA16=0531,0E0F1012A17=190C38,1F20213B3536153EA18=2543261C,28292A4882A19=49503F3767681B301D1E,6A3A3D1257A1A=4F503F3767681B301D1E,6A3A3D1257A1B=584041441B1D1E,465CA1C=5D1B4D60,4E1171130BA1D=51521A1B4A,54553E6DA1E=16184C0645,5A5B12A1F=24171841425E5F2F590D,32336322A20=025345,396B3C5623A21=020304695345,0708562BA22=0531,0E0F10128EA23=49190C38,1F20213B3536153E788FA24=4F502543261C1E,28292A48A25=2C2D2E274B,61623464147DA26=663F3767681B301D1E,6A3A3D120B57A27=584041441B1D1E,465CA28=16185D4D60,4E1113A29=24171851521A4A,54553E6DA2A=4C0645,5A5B7612A2B=41425E5F2F590D,3233632272A2C=0253,396B3C475623A2D=1601020304695345,0708562BA2E=4F50010531,0E0F1012A2F=01190C38,1F20213B3536153EA30=012543261C1E,28292A09900B4882A31=012C2D2E274B,6162346414726E7E73A32=16183F376768301D1E,6A3A3D126F7257A33=2417185D4041441D1E,465CA34=5D4D60,4E1113A35=51521A4A,5455763E6D83A36=4C06,5A5B12A37=4941425E5F2F590D,3233632272A38=4F50029145,396B3C567223A39=020304695345,070874562BA3A=0531,0E0F10120BA3B=190C38,1F20213B6C903536153E75B00=01701718254A31,1F20216162B01=0118582C26,674C38B02=50013F375152432D2E591D1E,121448B03=4901401B1D4B1E,393A5B11B04=014142441A69,4657B05=681B05,6B4E3E5CB06=682F0C4D6045,5455070832331215B07=1C,0E0F3C636DB08=1602415E5F27530645,3536136456B09=0230530D45,6A28292A0B56B0A=17180304,126F342223B0B=1819,3D103E2BB0C=50254A311E,1F202161626EB0D=49582C26,671B4C38B0E=3F375152432D2E591D,121448B0F=01401B1D4B,393A3B5A5B11B10=014142441A1B69,4657B11=01681B05,6B4E3E5CB12=16015D2F0C4D6045,5455070832331215B13=011C,0E0F3C630B6E6DB14=021718415E5F27530645,3536136456B15=021830530D45,6A28292A56B16=500304,12342223B17=4919,3D103E2BB18=254A31,1F4E21616278B19=582C26,671B4C38B1A=3F375152432D2E1B591D1E,121448B1B=401B1D4B1E,393A3B5A5B1147B1C=164142441A1B69,467157B1D=6805,6B4E0B3E5CB1E=17185D2F0C926045,5455070832331215B1F=181C,0E0F3C636DB20=5002415E5F27530645,3536136456B21=490230530D45,6A28292A56B22=0304,12342223B23=19,3D103E2BB24=254A311E,1F20136162B25=582C26671B4C38,00B26=163F375152432D2E1B591D1E,121448B27=401D4B1E,393A3B5A5B110BB28=17184142441A69,4657B29=186805,6B4E3E5CB2A=505D2F0C4D6045,54550708323376121585B2B=491C,0E0F3C63726DB2C=02415E5F275306,3536136456B2D=010230530D45,6A28292A56B2E=010304,12342223B2F=0119,3D103E2BB30=1601254A311E,1F2021616209906584B31=0166582C26674C38,0B726EB32=17183F375152432D2E591D1E,126F147248B33=18401D4B1E,393A3B5A5B11B34=504142441A69,4657B35=49681B05,6B4E763E5CB36=5D2F0C4D60,5455070832331215B37=1C,0E0F3C63726DB38=02415E5F27530645,353613645672B39=0230530D45,6A28292A744756B3A=160304,12342223B3B=19,3D106C900B3E2BC00=500170661825670C,5A5B1013141523C01=4F4901182C1C,1F2021222BC02=011637261B271D311E,6B1112C03=01402D2E1A1B311D381E,0708C04=0143,6A3A0E0F7148C05=41442F4B,32334635360B3EC06=24164A4D45,3C28292A4E1257C07=174C,545563345CC08=025D6859536045,3D56C09=0241425E5F5345,4764566DC0A=50186906,393B126FC0B=4F4918581951520304050D,61623EC0C=25671B0C1E,5A5B101314156E23C0D=2C1B1C,1F2021222BC0E=3F37264B1D31,6B1112C0F=01402D2E1A1B301D38,07080BC10=241601431B,6A3A0E0F48C11=011741442F4B,32334635363EC12=014A4D45,3C28292A4E1257C13=014C,545563346E5CC14=5002185D6804536045,3D56C15=4F49021841425E5F5345,64566DC16=6906,393B12C17=581951524404050D,61623EC18=25670C,5A5B101314152386C19=2C1B1C,1F2021220B2BC1A=24163F37261B271D31,6B1112C1B=17402D2E1A1B301D381E,0708C1C=43,6A3A0E0F48C1D=41582F4B,32334635363EC1E=50184A4D45,3C28292A4E1257C1F=4F49184C,545563345CC20=025D6859536045,3D56C21=0241425E5F5345,64566DC22=6906,393B12C23=581951520304050D,61620B3EC24=241625671B0C1E,5A5B1013141523C25=172C1B1C,1F2021222BC26=3F3726271D311E,6B1112C27=402D2E1A301D381E,0708C28=501843,6A5B0E0F48C29=4F491841442F4B,32334635363EC2A=4A4D45,3C28292A4E761257C2B=4C,54556334725C93C2C=025D68595360,3D56C2D=010241425E5F5345,640B566DC2E=2416016906,393B12C2F=0117581951520304050D,61623EC30=0125670C,5A5B1009901314152386C31=012C1C,1F202122726E2B75C32=50183F3726271D311E,6B11126F72C33=4F4918402D2E1A301D381E,070847C34=431B,6A3A0E0F48C35=41442F4B,3233467635363EC36=4A4D,3C28292A4E1257C37=4C,545563340B725CC38=2416025D6859536045,3D5672C39=021741425E5F5345,7464566DC3A=6906,393B12C3B=581951520304050D,61626C903E6573', + getTimeZhiIndex:function(hm){ + if(!hm){ + return 0; + } + if(hm.length>5){ + hm = hm.substr(0,5); + } + var x = 1; + for(var i=1;i<22;i+=2){ + if(hm>=((i<10?'0':'')+i+':00')&&hm<=((i+1<10?'0':'')+(i+1)+':59')){ + return x; + } + x++; + } + return 0; + }, + convertTime:function(hm){ + return this.ZHI[this.getTimeZhiIndex(hm)+1]; + }, + getJiaZiIndex:function(ganZhi){ + for(var i=0,j=this.JIA_ZI.length;i-1) { + right = right.substr(index+3); + var left = right; + if (left.indexOf('=')>-1) { + left = left.substr(0, left.indexOf('=') - 2); + } + var matched = false; + var months = left.substr(0, left.indexOf(':')); + var i; + var m; + var j; + for (i = 0, j = months.length; i < j; i += 2) { + m = months.substr(i, 2); + if (m==month) { + matched = true; + break; + } + } + if(matched) { + var ys = left.substr(left.indexOf(':') + 1); + ys = ys.substr(0, ys.indexOf(',')); + for (i = 0, j = ys.length; i < j; i += 2) { + m = ys.substr(i, 2); + l.push(this.YI_JI[parseInt(m,16)]); + } + break; + } + index = right.indexOf(day+'='); + } + if(l.length<1){ + l.push('无'); + } + return l; + }, + getDayJi:function(monthGanZhi,dayGanZhi){ + var l = []; + var day = this.hex(this.getJiaZiIndex(dayGanZhi)); + var month = this.hex(this.getJiaZiIndex(monthGanZhi)); + var right = this.DAY_YI_JI; + var index = right.indexOf(day+'='); + while(index>-1) { + right = right.substr(index+3); + var left = right; + if (left.indexOf('=')>-1) { + left = left.substr(0, left.indexOf('=') - 2); + } + var matched = false; + var months = left.substr(0, left.indexOf(':')); + var i; + var m; + var j; + for (i = 0, j = months.length; i < j; i += 2) { + m = months.substr(i, 2); + if (m==month) { + matched = true; + break; + } + } + if(matched) { + var js = left.substr(left.indexOf(',')+1); + for (i = 0, j = js.length; i < j; i += 2) { + m = js.substr(i, 2); + l.push(this.YI_JI[parseInt(m,16)]); + } + break; + } + index = right.indexOf(day+'='); + } + if(l.length<1){ + l.push('无'); + } + return l; + }, + getDayJiShen:function(lunarMonth,dayGanZhi){ + var l = []; + var day = this.hex(this.getJiaZiIndex(dayGanZhi)); + var month = Math.abs(lunarMonth).toString(16).toUpperCase(); + var index = this.DAY_SHEN_SHA.indexOf(month+day+'='); + if(index>-1) { + var left = this.DAY_SHEN_SHA.substr(index + 4); + if (left.indexOf('=')>-1) { + left = left.substr(0, left.indexOf('=') - 3); + } + var js = left.substr(0, left.indexOf(',')); + for (var i = 0, j = js.length; i < j; i += 2) { + var m = js.substr(i, 2); + l.push(this.SHEN_SHA[parseInt(m, 16)]); + } + } + if(l.length<1){ + l.push('无'); + } + return l; + }, + getDayXiongSha:function(lunarMonth,dayGanZhi){ + var l = []; + var day = this.hex(this.getJiaZiIndex(dayGanZhi)); + var month = Math.abs(lunarMonth).toString(16).toUpperCase(); + var index = this.DAY_SHEN_SHA.indexOf(month+day+'='); + if(index>-1) { + var left = this.DAY_SHEN_SHA.substr(index + 4); + if (left.indexOf('=')>-1) { + left = left.substr(0, left.indexOf('=') - 3); + } + var xs = left.substr(left.indexOf(',')+1); + for (var i = 0, j = xs.length; i < j; i += 2) { + var m = xs.substr(i, 2); + l.push(this.SHEN_SHA[parseInt(m, 16)]); + } + } + if(l.length<1){ + l.push('无'); + } + return l; + }, + getTimeYi:function(dayGanZhi,timeGanZhi){ + var l = []; + var day = this.hex(this.getJiaZiIndex(dayGanZhi)); + var time = this.hex(this.getJiaZiIndex(timeGanZhi)); + var index = this.TIME_YI_JI.indexOf(day+time+'='); + if(index>-1) { + var left = this.TIME_YI_JI.substr(index + 5); + if (left.indexOf('=')>-1) { + left = left.substr(0, left.indexOf('=') - 4); + } + var ys = left.substr(0, left.indexOf(',')); + for (var i = 0, j = ys.length; i < j; i += 2) { + var m = ys.substr(i, 2); + l.push(this.YI_JI[parseInt(m, 16)]); + } + } + if(l.length<1){ + l.push('无'); + } + return l; + }, + getTimeJi:function(dayGanZhi,timeGanZhi){ + var l = []; + var day = this.hex(this.getJiaZiIndex(dayGanZhi)); + var time = this.hex(this.getJiaZiIndex(timeGanZhi)); + var index = this.TIME_YI_JI.indexOf(day+time+'='); + if(index>-1) { + var left = this.TIME_YI_JI.substr(index + 5); + if (left.indexOf('=')>-1) { + left = left.substr(0, left.indexOf('=') - 4); + } + var js = left.substr(left.indexOf(',')+1); + for (var i = 0, j = js.length; i < j; i += 2) { + var m = js.substr(i, 2); + l.push(this.YI_JI[parseInt(m, 16)]); + } + } + if(l.length<1){ + l.push('无'); + } + return l; + }, + getXunIndex:function(ganZhi){ + var gan = ganZhi.substr(0,1); + var zhi = ganZhi.substr(1); + var ganIndex = 0; + var zhiIndex = 0; + var i; + var j; + for(i=0,j=this.GAN.length;i0){ + right = right.substr(n); + } + while((0!==right.indexOf(key))&&right.length>=_SIZE){ + right = right.substr(_SIZE); + } + return right; + }; + var _findBackward = function(key){ + var start = _DATA_IN_USE.lastIndexOf(key); + if(start<0) { + return null; + } + var keySize = key.length; + var left = _DATA_IN_USE.substr(0,start+keySize); + var size = left.length; + var n = size%_SIZE; + if(n>0){ + left = left.substr(0,size-n); + } + size = left.length; + while((size-keySize!==left.lastIndexOf(key))&&size>=_SIZE){ + left = left.substr(0,size-_SIZE); + size = left.length; + } + return left; + }; + var _findHolidaysForward = function(key){ + var l = []; + var s = _findForward(key); + if(null==s) { + return l; + } + while(0===s.indexOf(key)){ + l.push(_buildHolidayForward(s)); + s = s.substr(_SIZE); + } + return l; + }; + var _findHolidaysBackward = function(key){ + var l = []; + var s = _findBackward(key); + if(null==s) { + return l; + } + var size = s.length; + var keySize = key.length; + while(size-keySize===s.lastIndexOf(key)){ + l.push(_buildHolidayBackward(s)); + s = s.substr(0,size-_SIZE); + size = s.length; + } + l.reverse(); + return l; + }; + var _getHoliday = function(args){ + var l = []; + switch(args.length){ + case 1: + l = _findHolidaysForward(args[0].replace(/-/g,'')); + break; + case 3: + l = _findHolidaysForward(args[0]+_padding(args[1])+_padding(args[2])); + break; + } + return l.length<1?null:l[0]; + }; + var _getHolidays = function(args){ + var l = []; + switch(args.length){ + case 1: + l = _findHolidaysForward((args[0]+'').replace(/-/g,'')); + break; + case 2: + l = _findHolidaysForward(args[0]+_padding(args[1])); + break; + } + return l; + }; + var _getHolidaysByTarget = function(args){ + var l = []; + switch(args.length){ + case 1: + l = _findHolidaysBackward((args[0]+'').replace(/-/g,'')); + break; + case 3: + l = _findHolidaysBackward(args[0]+_padding(args[1])+_padding(args[2])); + break; + } + return l; + }; + var _fixNames = function(names){ + if(names){ + _NAMES_IN_USE = names; + } + }; + var _fixData = function(data){ + if(!data){ + return; + } + var append = []; + while(data.length>=_SIZE){ + var segment = data.substr(0,_SIZE); + var day = segment.substr(0,8); + var holiday = _getHoliday([day]); + if(!holiday){ + append.push(segment); + }else{ + var nameIndex = -1; + for(var i=0,j=_NAMES_IN_USE.length;i-1){ + var old = day+String.fromCharCode(nameIndex+_ZERO)+(holiday.isWork()?'0':'1')+holiday.getTarget().replace(/-/g,''); + _DATA_IN_USE = _DATA_IN_USE.replace(new RegExp(old, 'g'), segment); + } + } + data = data.substr(_SIZE); + } + if(append.length>0){ + _DATA_IN_USE += append.join(''); + } + }; + var _fix = function(args){ + switch(args.length){ + case 1: + _fixData(args[0]); + break; + case 2: + _fixNames(args[0]); + _fixData(args[1]); + break; + } + }; + return { + NAMES:_NAMES, + getHoliday:function(){return _getHoliday(arguments);}, + getHolidays:function(){return _getHolidays(arguments);}, + getHolidaysByTarget:function(){return _getHolidaysByTarget(arguments);}, + fix:function(){_fix(arguments);} + }; + })(['元旦节','春节','清明节','劳动节','端午节','中秋节','国庆节','国庆中秋','抗战胜利日']); + var NineStar = (function(){ + var _fromIndex=function(index){ + return { + _p:{index:index}, + getNumber:function(){return NineStar.NUMBER[this._p.index];}, + getColor:function(){return NineStar.COLOR[this._p.index];}, + getWuXing:function(){return NineStar.WU_XING[this._p.index];}, + getPosition:function(){return NineStar.POSITION[this._p.index];}, + getPositionDesc:function(){return LunarUtil.POSITION_DESC[this.getPosition()];}, + getNameInXuanKong:function(){return NineStar.NAME_XUAN_KONG[this._p.index];}, + getNameInBeiDou:function(){return NineStar.NAME_BEI_DOU[this._p.index];}, + getNameInQiMen:function(){return NineStar.NAME_QI_MEN[this._p.index];}, + getNameInTaiYi:function(){return NineStar.NAME_TAI_YI[this._p.index];}, + getLuckInQiMen:function(){return NineStar.LUCK_QI_MEN[this._p.index];}, + getLuckInXuanKong:function(){return NineStar.LUCK_XUAN_KONG[this._p.index];}, + getYinYangInQiMen:function(){return NineStar.YIN_YANG_QI_MEN[this._p.index];}, + getTypeInTaiYi:function(){return NineStar.TYPE_TAI_YI[this._p.index];}, + getBaMenInQiMen:function(){return NineStar.BA_MEN_QI_MEN[this._p.index];}, + getSongInTaiYi:function(){return NineStar.SONG_TAI_YI[this._p.index];}, + getIndex:function(){return this._p.index;}, + toString:function(){return this.getNumber()+this.getColor()+this.getWuXing()+this.getNameInBeiDou();}, + toFullString:function(){ + var s = this.getNumber(); + s += this.getColor(); + s += this.getWuXing(); + s += ' '; + s += this.getPosition(); + s += '('; + s += this.getPositionDesc(); + s += ') '; + s += this.getNameInBeiDou(); + s += ' 玄空['; + s += this.getNameInXuanKong(); + s += ' '; + s += this.getLuckInXuanKong(); + s += '] 奇门['; + s += this.getNameInQiMen(); + s += ' '; + s += this.getLuckInQiMen(); + if(this.getBaMenInQiMen().length>0) { + s += ' '; + s += this.getBaMenInQiMen(); + s += '门'; + } + s += ' '; + s += this.getYinYangInQiMen(); + s += '] 太乙['; + s += this.getNameInTaiYi(); + s += ' '; + s += this.getTypeInTaiYi(); + s += ']'; + return s; + } + }; + }; + return { + NUMBER:['一','二','三','四','五','六','七','八','九'], + COLOR:['白','黒','碧','绿','黄','白','赤','白','紫'], + WU_XING:['水','土','木','木','土','金','金','土','火'], + POSITION:['坎','坤','震','巽','中','乾','兑','艮','离'], + NAME_BEI_DOU:['天枢','天璇','天玑','天权','玉衡','开阳','摇光','洞明','隐元'], + NAME_XUAN_KONG:['贪狼','巨门','禄存','文曲','廉贞','武曲','破军','左辅','右弼'], + NAME_QI_MEN:['天蓬','天芮','天冲','天辅','天禽','天心','天柱','天任','天英'], + BA_MEN_QI_MEN:['休','死','伤','杜','','开','惊','生','景'], + NAME_TAI_YI:['太乙','摄提','轩辕','招摇','天符','青龙','咸池','太阴','天乙'], + TYPE_TAI_YI:['吉神','凶神','安神','安神','凶神','吉神','凶神','吉神','吉神'], + SONG_TAI_YI:['门中太乙明,星官号贪狼,赌彩财喜旺,婚姻大吉昌,出入无阻挡,参谒见贤良,此行三五里,黑衣别阴阳。','门前见摄提,百事必忧疑,相生犹自可,相克祸必临,死门并相会,老妇哭悲啼,求谋并吉事,尽皆不相宜,只可藏隐遁,若动伤身疾。','出入会轩辕,凡事必缠牵,相生全不美,相克更忧煎,远行多不利,博彩尽输钱,九天玄女法,句句不虚言。','招摇号木星,当之事莫行,相克行人阻,阴人口舌迎,梦寐多惊惧,屋响斧自鸣,阴阳消息理,万法弗违情。','五鬼为天符,当门阴女谋,相克无好事,行路阻中途,走失难寻觅,道逢有尼姑,此星当门值,万事有灾除。','神光跃青龙,财气喜重重,投入有酒食,赌彩最兴隆,更逢相生旺,休言克破凶,见贵安营寨,万事总吉同。','吾将为咸池,当之尽不宜,出入多不利,相克有灾情,赌彩全输尽,求财空手回,仙人真妙语,愚人莫与知,动用虚惊退,反复逆风吹。','坐临太阴星,百祸不相侵,求谋悉成就,知交有觅寻,回风归来路,恐有殃伏起,密语中记取,慎乎莫轻行。','迎来天乙星,相逢百事兴,运用和合庆,茶酒喜相迎,求谋并嫁娶,好合有天成,祸福如神验,吉凶甚分明。'], + LUCK_XUAN_KONG:['吉','凶','凶','吉','凶','吉','凶','吉','吉'], + LUCK_QI_MEN:['大凶','大凶','小吉','大吉','大吉','大吉','小凶','小吉','小凶'], + YIN_YANG_QI_MEN:['阳','阴','阳','阳','阳','阴','阴','阳','阴'], + fromIndex:function(index){return _fromIndex(index);} + }; + })(); + var EightChar = (function(){ + var CHANG_SHENG_OFFSET = {'甲':1,'丙':10,'戊':10,'庚':7,'壬':4,'乙':6,'丁':9,'己':9,'辛':0,'癸':3}; + var _fromLunar=function(lunar){ + return { + _p:{sect:2,lunar:lunar}, + setSect:function(sect){this._p.sect=(1==sect)?1:2;}, + getSect:function(){return this._p.sect;}, + getDayGanIndex:function(){return 2==this._p.sect?this._p.lunar.getDayGanIndexExact2():this._p.lunar.getDayGanIndexExact();}, + getDayZhiIndex:function(){return 2==this._p.sect?this._p.lunar.getDayZhiIndexExact2():this._p.lunar.getDayZhiIndexExact();}, + getYear:function(){return this._p.lunar.getYearInGanZhiExact();}, + getYearGan:function(){return this._p.lunar.getYearGanExact();}, + getYearZhi:function(){return this._p.lunar.getYearZhiExact();}, + getYearHideGan:function(){return LunarUtil.ZHI_HIDE_GAN[this.getYearZhi()];}, + getYearWuXing:function(){return LunarUtil.WU_XING_GAN[this.getYearGan()]+LunarUtil.WU_XING_ZHI[this.getYearZhi()];}, + getYearNaYin:function(){return LunarUtil.NAYIN[this.getYear()];}, + getYearShiShenGan:function(){return LunarUtil.SHI_SHEN_GAN[this.getDayGan()+this.getYearGan()];}, + getYearShiShenZhi:function(){ + var dayGan = this.getDayGan(); + var zhi = this.getYearZhi(); + var hideGan = LunarUtil.ZHI_HIDE_GAN[zhi]; + var l = []; + for(var i=0,j=hideGan.length;i=12){ + index -= 12; + } + if(index<0){ + index += 12; + } + return EightChar.CHANG_SHENG[index]; + }, + getYearDiShi:function(){return this._getDiShi(this._p.lunar.getYearZhiIndexExact());}, + getYearXun:function(){return this._p.lunar.getYearXunExact()}, + getYearXunKong:function(){return this._p.lunar.getYearXunKongExact()}, + getMonth:function(){return this._p.lunar.getMonthInGanZhiExact();}, + getMonthGan:function(){return this._p.lunar.getMonthGanExact();}, + getMonthZhi:function(){return this._p.lunar.getMonthZhiExact();}, + getMonthHideGan:function(){return LunarUtil.ZHI_HIDE_GAN[this.getMonthZhi()];}, + getMonthWuXing:function(){return LunarUtil.WU_XING_GAN[this.getMonthGan()]+LunarUtil.WU_XING_ZHI[this.getMonthZhi()];}, + getMonthNaYin:function(){return LunarUtil.NAYIN[this.getMonth()];}, + getMonthShiShenGan:function(){return LunarUtil.SHI_SHEN_GAN[this.getDayGan()+this.getMonthGan()];}, + getMonthShiShenZhi:function(){ + var dayGan = this.getDayGan(); + var zhi = this.getMonthZhi(); + var hideGan = LunarUtil.ZHI_HIDE_GAN[zhi]; + var l = []; + for(var i=0,j=hideGan.length;i=10){ + ganIndex -= 10; + } + var zhiIndex = this._p.lunar.getMonthZhiIndexExact() + 3; + if(zhiIndex>=12){ + zhiIndex -= 12; + } + return LunarUtil.GAN[ganIndex+1]+LunarUtil.ZHI[zhiIndex+1]; + }, + getTaiYuanNaYin:function(){return LunarUtil.NAYIN[this.getTaiYuan()];}, + getMingGong:function(){ + var monthZhiIndex = 0; + var timeZhiIndex = 0; + for(var i=0,j=EightChar.MONTH_ZHI.length;i12){ + zhiIndex -= 12; + } + var jiaZiIndex = LunarUtil.getJiaZiIndex(lunar.getMonthInGanZhiExact()) - (monthZhiIndex-zhiIndex); + if(jiaZiIndex>=60){ + jiaZiIndex -= 60; + } + if(jiaZiIndex<0){ + jiaZiIndex += 60; + } + return LunarUtil.JIA_ZI[jiaZiIndex]; + }, + getMingGongNaYin:function(){return LunarUtil.NAYIN[this.getMingGong()];}, + getShenGong:function(){ + var monthZhiIndex = 0; + var timeZhiIndex = 0; + for(var i=0,j=EightChar.MONTH_ZHI.length;i=60){ + jiaZiIndex -= 60; + } + if(jiaZiIndex<0){ + jiaZiIndex += 60; + } + return LunarUtil.JIA_ZI[jiaZiIndex]; + }, + getShenGongNaYin:function(){return LunarUtil.NAYIN[this.getShenGong()];}, + getLunar:function(){return this._p.lunar;}, + getYun:function(gender){ + var lunar = this.getLunar(); + var yang = 0 === lunar.getYearGanIndexExact() % 2; + var man = 1 === gender; + var forward = (yang && man) || (!yang && !man); + var start = (function(){ + var prev = lunar.getPrevJie(); + var next = lunar.getNextJie(); + var current = lunar.getSolar(); + var start = forward ? current : prev.getSolar(); + var end = forward ? next.getSolar() : current; + const endTimeZhiIndex = (end.getHour() === 23) ? 11 : LunarUtil.getTimeZhiIndex(end.toYmdHms().substr(11, 5)); + const startTimeZhiIndex = (start.getHour() === 23) ? 11 : LunarUtil.getTimeZhiIndex(start.toYmdHms().substr(11, 5)); + // 时辰差 + var hourDiff = endTimeZhiIndex - startTimeZhiIndex; + // 天数差 + var dayDiff = ExactDate.getDaysBetweenYmd(start.getYear(), start.getMonth(), start.getDay(), end.getYear(), end.getMonth(), end.getDay()); + if (hourDiff < 0) { + hourDiff += 12; + dayDiff--; + } + var monthDiff = Math.floor(hourDiff * 10 / 30); + var month = dayDiff * 4 + monthDiff; + var day = hourDiff * 10 - monthDiff * 30; + var year = Math.floor(month / 12); + month = month - year * 12; + return { + year: year, + month: month, + day: day + }; + })(); + var buildLiuYue = function(liuNian, index){ + return { + _p: { + index: index, + liuNian: liuNian + }, + getIndex:function(){return this._p.index;}, + getMonthInChinese:function(){return LunarUtil.MONTH[this._p.index + 1];}, + getGanZhi:function(){ + var offset = 0; + var yearGan = liuNian.getGanZhi().substr(0, 1); + if ('甲'===yearGan || '己'===yearGan) { + offset = 2; + } else if ('乙'===yearGan || '庚'===yearGan) { + offset = 4; + } else if ('丙'===yearGan || '辛'===yearGan) { + offset = 6; + } else if ('丁'===yearGan || '壬'===yearGan) { + offset = 8; + } + var gan = LunarUtil.GAN[(this._p.index + offset) % 10 + 1]; + var zhi = LunarUtil.ZHI[(this._p.index + LunarUtil.BASE_MONTH_ZHI_INDEX) % 12 + 1]; + return gan + zhi; + }, + getXun:function(){return LunarUtil.getXun(this.getGanZhi());}, + getXunKong:function(){return LunarUtil.getXunKong(this.getGanZhi());} + }; + }; + var buildLiuNian = function(daYun, index){ + return { + _p: { + year: daYun.getStartYear() + index, + age: daYun.getStartAge() + index, + index: index, + daYun: daYun, + lunar: daYun.getLunar() + }, + getYear: function(){return this._p.year;}, + getAge: function(){return this._p.age;}, + getIndex: function(){return this._p.index;}, + getLunar: function(){return this._p.lunar;}, + getGanZhi: function(){ + var offset = LunarUtil.getJiaZiIndex(this._p.lunar.getJieQiTable()['立春'].getLunar().getYearInGanZhiExact()) + this._p.index; + if (this._p.daYun.getIndex() > 0) { + offset += this._p.daYun.getStartAge() - 1; + } + offset %= LunarUtil.JIA_ZI.length; + return LunarUtil.JIA_ZI[offset]; + }, + getXun:function(){return LunarUtil.getXun(this.getGanZhi());}, + getXunKong:function(){return LunarUtil.getXunKong(this.getGanZhi());}, + getLiuYue: function(){ + var l = []; + for (var i = 0; i < 12; i++) { + l.push(buildLiuYue(this,i)); + } + return l; + } + }; + }; + var buildXiaoYun = function(daYun, index, forward){ + return { + _p: { + year: daYun.getStartYear() + index, + age: daYun.getStartAge() + index, + index: index, + daYun: daYun, + forward: forward, + lunar: daYun.getLunar() + }, + getYear: function(){return this._p.year;}, + getAge: function(){return this._p.age;}, + getIndex: function(){return this._p.index;}, + getGanZhi: function(){ + var offset = LunarUtil.getJiaZiIndex(this._p.lunar.getTimeInGanZhi()); + var add = this._p.index + 1; + if (this._p.daYun.getIndex() > 0) { + add += this._p.daYun.getStartAge() - 1; + } + offset += this._p.forward ? add : -add; + var size = LunarUtil.JIA_ZI.length; + while (offset < 0) { + offset += size; + } + offset %= size; + return LunarUtil.JIA_ZI[offset]; + }, + getXun:function(){return LunarUtil.getXun(this.getGanZhi());}, + getXunKong:function(){return LunarUtil.getXunKong(this.getGanZhi());} + }; + }; + var buildDaYun = function(yun, index){ + var birthYear = yun.getLunar().getSolar().getYear(); + var year = yun.getStartSolar().getYear(); + var startYear; + var startAge; + var endYear; + var endAge; + if (index < 1) { + startYear = birthYear; + startAge = 1; + endYear = year - 1; + endAge = year - birthYear; + } else { + var add = (index - 1) * 10; + startYear = year + add; + startAge = startYear - birthYear + 1; + endYear = startYear + 9; + endAge = startAge + 9; + } + return { + _p: { + startYear: startYear, + endYear: endYear, + startAge: startAge, + endAge: endAge, + index: index, + yun: yun, + lunar: yun.getLunar() + }, + getStartYear: function(){return this._p.startYear;}, + getEndYear: function(){return this._p.endYear;}, + getStartAge: function(){return this._p.startAge;}, + getEndAge: function(){return this._p.endAge;}, + getIndex: function(){return this._p.index;}, + getLunar: function(){return this._p.lunar;}, + getGanZhi: function(){ + if (this._p.index < 1) { + return ''; + } + var offset = LunarUtil.getJiaZiIndex(this._p.lunar.getMonthInGanZhiExact()); + offset += this._p.yun.isForward() ? this._p.index : -this._p.index; + var size = LunarUtil.JIA_ZI.length; + if (offset >= size) { + offset -= size; + } + if (offset < 0) { + offset += size; + } + return LunarUtil.JIA_ZI[offset]; + }, + getXun:function(){return LunarUtil.getXun(this.getGanZhi());}, + getXunKong:function(){return LunarUtil.getXunKong(this.getGanZhi());}, + getLiuNian: function(n){ + if (!n) { + n = 10; + } + if (this._p.index < 1) { + n = this._p.endYear-this._p.startYear+1; + } + var l = []; + for (var i = 0; i < n; i++) { + l.push(buildLiuNian(this,i)); + } + return l; + }, + getXiaoYun: function(n){ + if (!n) { + n = 10; + } + if (this._p.index < 1) { + n = this._p.endYear-this._p.startYear+1; + } + var l = []; + for (var i = 0; i < n; i++) { + l.push(buildXiaoYun(this,i,this._p.yun.isForward())); + } + return l; + } + }; + }; + return { + _p: { + gender: gender, + startYear: start.year, + startMonth: start.month, + startDay: start.day, + forward: forward, + lunar: lunar + }, + getGender: function(){return this._p.gender;}, + getStartYear: function(){return this._p.startYear;}, + getStartMonth: function(){return this._p.startMonth;}, + getStartDay: function(){return this._p.startDay;}, + isForward: function(){return this._p.forward;}, + getLunar: function(){return this._p.lunar;}, + getStartSolar: function(){ + var birth = this._p.lunar.getSolar(); + var c = ExactDate.fromYmdHms(birth.getYear(), birth.getMonth(), birth.getDay(), birth.getHour(), birth.getMinute(), birth.getSecond()); + c.setFullYear(birth.getYear() + this._p.startYear); + c.setMonth(birth.getMonth()-1+this._p.startMonth); + c.setDate(birth.getDay() + this._p.startDay); + return Solar.fromDate(c); + }, + getDaYun: function(n){ + if (!n) { + n = 10; + } + var l = []; + for (var i = 0; i < n; i++) { + l.push(buildDaYun(this,i)); + } + return l; + } + }; + }, + toString:function(){return this.getYear()+' '+this.getMonth()+' '+this.getDay()+' '+this.getTime();} + }; + }; + return { + MONTH_ZHI:['','寅','卯','辰','巳','午','未','申','酉','戌','亥','子','丑'], + CHANG_SHENG:['长生','沐浴','冠带','临官','帝旺','衰','病','死','墓','绝','胎','养'], + fromLunar:function(lunar){return _fromLunar(lunar);} + }; + })(); + var LunarTime = (function(){ + var _fromYmdHms=function(lunarYear,lunarMonth,lunarDay,hour,minute,second){ + var lunar=Lunar.fromYmdHms(lunarYear,lunarMonth,lunarDay,hour,minute,second); + var zhiIndex=LunarUtil.getTimeZhiIndex([(hour<10?'0':'')+hour,(minute<10?'0':'')+minute].join(':')); + var ganIndex = (lunar.getDayGanIndexExact() % 5 * 2 + zhiIndex) % 10; + return { + _p:{ + ganIndex:ganIndex, + zhiIndex:zhiIndex, + lunar:lunar + }, + getGanIndex:function(){return this._p.ganIndex;}, + getZhiIndex:function(){return this._p.zhiIndex;}, + getGan:function(){return LunarUtil.GAN[this._p.ganIndex+1];}, + getZhi:function(){return LunarUtil.ZHI[this._p.zhiIndex+1];}, + getGanZhi:function(){return this.getGan()+this.getZhi();}, + getShengXiao:function(){return LunarUtil.SHENGXIAO[this._p.zhiIndex+1];}, + getPositionXi:function(){return LunarUtil.POSITION_XI[this._p.ganIndex + 1];}, + getPositionXiDesc:function(){return LunarUtil.POSITION_DESC[this.getPositionXi()];}, + getPositionYangGui:function(){return LunarUtil.POSITION_YANG_GUI[this._p.ganIndex + 1];}, + getPositionYangGuiDesc:function(){return LunarUtil.POSITION_DESC[this.getPositionYangGui()];}, + getPositionYinGui:function(){return LunarUtil.POSITION_YIN_GUI[this._p.ganIndex + 1];}, + getPositionYinGuiDesc:function(){return LunarUtil.POSITION_DESC[this.getPositionYinGui()];}, + getPositionFu:function(sect){return (1===sect?LunarUtil.POSITION_FU:LunarUtil.POSITION_FU_2)[this._p.ganIndex + 1];}, + getPositionFuDesc:function(sect){return LunarUtil.POSITION_DESC[this.getPositionFu(sect)];}, + getPositionCai:function(){return LunarUtil.POSITION_CAI[this._p.ganIndex + 1];}, + getPositionCaiDesc:function(){return LunarUtil.POSITION_DESC[this.getPositionCai()];}, + getNaYin:function(){return LunarUtil.NAYIN[this.getGanZhi()];}, + getTianShen:function(){ + return LunarUtil.TIAN_SHEN[(this._p.zhiIndex + LunarUtil.ZHI_TIAN_SHEN_OFFSET[this._p.lunar.getDayZhiExact()]) % 12 + 1]; + }, + getTianShenType:function(){return LunarUtil.TIAN_SHEN_TYPE[this.getTianShen()];}, + getTianShenLuck:function(){return LunarUtil.TIAN_SHEN_TYPE_LUCK[this.getTianShenType()];}, + getChong:function(){return LunarUtil.CHONG[this.getZhi()];}, + getSha:function(){return LunarUtil.SHA[this.getZhi()];}, + getChongShengXiao:function(){ + var chong = this.getChong(); + for (var i = 0, j = LunarUtil.ZHI.length; i < j; i++) { + if (LunarUtil.ZHI[i]===chong) { + return LunarUtil.SHENGXIAO[i]; + } + } + return ''; + }, + getChongDesc:function(){return '(' + this.getChongGan() + this.getChong() + ')' + this.getChongShengXiao();}, + getChongGan:function(){return LunarUtil.CHONG_GAN[this.getGan()];}, + getChongGanTie:function(){return LunarUtil.CHONG_GAN_TIE[this.getGan()];}, + getYi:function(){return LunarUtil.getTimeYi(this._p.lunar.getDayInGanZhiExact(), this.getGanZhi());}, + getJi:function(){return LunarUtil.getTimeJi(this._p.lunar.getDayInGanZhiExact(), this.getGanZhi());}, + getNineStar:function(){ + var solarYmd = this._p.lunar.getSolar().toYmd(); + var jieQi = this._p.lunar.getJieQiTable(); + var asc = false; + if (solarYmd>=jieQi['冬至'].toYmd() && solarYmd-1) { + start = asc ? 1 : 9; + } else if ('辰戌丑未'.indexOf(dayZhi)>-1) { + start = asc ? 4 : 6; + } + var index = asc ? start + this._p.zhiIndex - 1 : start - this._p.zhiIndex - 1; + if (index > 8) { + index -= 9; + } + if (index < 0) { + index += 9; + } + return NineStar.fromIndex(index); + }, + getXun:function(){return LunarUtil.getXun(this.getGanZhi());}, + getXunKong:function(){return LunarUtil.getXunKong(this.getGanZhi());}, + getMinHm:function(){ + var hour = this._p.lunar.getHour(); + if(hour <1){ + return '00:00'; + }else if(hour > 22){ + return '23:00'; + } + if(hour%2===0){ + hour-=1; + } + return (hour<10?'0':'')+hour+':00'; + }, + getMaxHm:function(){ + var hour = this._p.lunar.getHour(); + if (hour <1){ + return '00:59'; + } else if (hour > 22) { + return '23:59'; + } + if(hour%2!==0){ + hour+=1; + } + return (hour<10?'0':'')+hour+':59'; + }, + toString:function(){return this.getGanZhi();} + }; + }; + return { + fromYmdHms:function(lunarYear,lunarMonth,lunarDay,hour,minute,second){return _fromYmdHms(lunarYear,lunarMonth,lunarDay,hour,minute,second);}, + }; + })(); + var FotoUtil = (function(){ + var XIU_OFFSET = [11, 13, 15, 17, 19, 21, 24, 0, 2, 4, 7, 9]; + var _f=function(name,result,everyMonth,remark){ + return { + _p:{ + name:name, + result:result?result:'', + everyMonth:everyMonth?true:false, + remark:remark?remark:'' + }, + getName:function(){return this._p.name;}, + getResult:function(){return this._p.result;}, + isEveryMonth:function(){return this._p.everyMonth;}, + getRemark:function(){return this._p.remark;}, + toString:function(){return this._p.name;}, + toFullString:function(){ + var l = [this._p.name]; + if(this._p.result) { + l.push(this._p.result); + } + if(this._p.remark) { + l.push(this._p.remark); + } + return l.join(' '); + } + }; + }; + var _getXiu=function(m,d){ + return FotoUtil.XIU_27[(XIU_OFFSET[Math.abs(m)-1] + d - 1) % FotoUtil.XIU_27.length]; + }; + var dj='犯者夺纪'; + var js='犯者减寿'; + var ss='犯者损寿'; + var xl='犯者削禄夺纪'; + var jw='犯者三年内夫妇俱亡'; + var _y=_f('杨公忌'); + var _t=_f('四天王巡行', '', true); + var _d=_f('斗降', dj, true); + var _s=_f('月朔', dj, true); + var _w=_f('月望', dj, true); + var _h=_f('月晦', js, true); + var _l=_f('雷斋日', js, true); + var _j=_f('九毒日', '犯者夭亡,奇祸不测'); + var _r=_f('人神在阴', '犯者得病', true, '宜先一日即戒'); + var _m=_f('司命奏事', js, true, '如月小,即戒廿九'); + var _hh=_f('月晦', js, true, '如月小,即戒廿九'); + return { + XIU_27:['角','亢','氐','房','心','尾','箕','斗','女','虚','危','室','壁','奎','娄','胃','昴','毕','觜','参','井','鬼','柳','星','张','翼','轸'], + DAY_ZHAI_GUAN_YIN:['1-8','2-7','2-9','2-19','3-3','3-6','3-13','4-22','5-3','5-17','6-16','6-18','6-19','6-23','7-13','8-16','9-19','9-23','10-2','11-19','11-24','12-25'], + FESTIVAL:{ + '1-1': [_f('天腊,玉帝校世人神气禄命', xl), _s], + '1-3': [_f('万神都会', dj), _d], + '1-5': [_f('五虚忌')], + '1-6': [_f('六耗忌'), _l], + '1-7': [_f('上会日', ss)], + '1-8': [_f('五殿阎罗天子诞', dj), _t], + '1-9': [_f('玉皇上帝诞', dj)], + '1-13': [_y], + '1-14': [_f('三元降', js), _t], + '1-15': [_f('三元降', js), _f('上元神会', dj), _w, _t], + '1-16': [_f('三元降', js)], + '1-19': [_f('长春真人诞')], + '1-23': [_f('三尸神奏事'), _t], + '1-25': [_h, _f('天地仓开日', '犯者损寿,子带疾')], + '1-27': [_d], + '1-28': [_r], + '1-29': [_t], + '1-30': [_hh, _m, _t], + '2-1': [_f('一殿秦广王诞', dj), _s], + '2-2': [_f('万神都会', dj), _f('福德土地正神诞', '犯者得祸')], + '2-3': [_f('文昌帝君诞', xl), _d], + '2-6': [_f('东华帝君诞'), _l], + '2-8': [_f('释迦牟尼佛出家', dj), _f('三殿宋帝王诞', dj), _f('张大帝诞', dj), _t], + '2-11': [_y], + '2-14': [_t], + '2-15': [_f('释迦牟尼佛涅槃', xl), _f('太上老君诞', xl), _f('月望', xl, true), _t], + '2-17': [_f('东方杜将军诞')], + '2-18': [_f('四殿五官王诞', xl), _f('至圣先师孔子讳辰', xl)], + '2-19': [_f('观音大士诞', dj)], + '2-21': [_f('普贤菩萨诞')], + '2-23': [_t], + '2-25': [_h], + '2-27': [_d], + '2-28': [_r], + '2-29': [_t], + '2-30': [_hh, _m, _t], + '3-1': [_f('二殿楚江王诞', dj), _s], + '3-3': [_f('玄天上帝诞', dj), _d], + '3-6': [_l], + '3-8': [_f('六殿卞城王诞', dj), _t], + '3-9': [_f('牛鬼神出', '犯者产恶胎'), _y], + '3-12': [_f('中央五道诞')], + '3-14': [_t], + '3-15': [_f('昊天上帝诞', dj), _f('玄坛诞', dj), _w, _t], + '3-16': [_f('准提菩萨诞', dj)], + '3-19': [_f('中岳大帝诞'), _f('后土娘娘诞'), _f('三茅降')], + '3-20': [_f('天地仓开日', ss), _f('子孙娘娘诞')], + '3-23': [_t], + '3-25': [_h], + '3-27': [_f('七殿泰山王诞'), _d], + '3-28': [_r, _f('苍颉至圣先师诞', xl), _f('东岳大帝诞')], + '3-29': [_t], + '3-30': [_hh, _m, _t], + '4-1': [_f('八殿都市王诞', dj), _s], + '4-3': [_d], + '4-4': [_f('万神善会', '犯者失瘼夭胎'), _f('文殊菩萨诞')], + '4-6': [_l], + '4-7': [_f('南斗、北斗、西斗同降', js), _y], + '4-8': [_f('释迦牟尼佛诞', dj), _f('万神善会', '犯者失瘼夭胎'), _f('善恶童子降', '犯者血死'), _f('九殿平等王诞'), _t], + '4-14': [_f('纯阳祖师诞', js), _t], + '4-15': [_w, _f('钟离祖师诞'), _t], + '4-16': [_f('天地仓开日', ss)], + '4-17': [_f('十殿转轮王诞', dj)], + '4-18': [_f('天地仓开日', ss), _f('紫徽大帝诞', ss)], + '4-20': [_f('眼光圣母诞')], + '4-23': [_t], + '4-25': [_h], + '4-27': [_d], + '4-28': [_r], + '4-29': [_t], + '4-30': [_hh, _m, _t], + '5-1': [_f('南极长生大帝诞', dj), _s], + '5-3': [_d], + '5-5': [_f('地腊', xl), _f('五帝校定生人官爵', xl), _j, _y], + '5-6': [_j, _l], + '5-7': [_j], + '5-8': [_f('南方五道诞'), _t], + '5-11': [_f('天地仓开日', ss),_f('天下都城隍诞')], + '5-12': [_f('炳灵公诞')], + '5-13': [_f('关圣降', xl)], + '5-14': [_f('夜子时为天地交泰', jw), _t], + '5-15': [_w, _j, _t], + '5-16': [_f('九毒日', jw), _f('天地元气造化万物之辰', jw)], + '5-17': [_j], + '5-18': [_f('张天师诞')], + '5-22': [_f('孝娥神诞', dj)], + '5-23': [_t], + '5-25': [_j, _h], + '5-26': [_j], + '5-27': [_j, _d], + '5-28': [_r], + '5-29': [_t], + '5-30': [_hh, _m, _t], + '6-1': [_s], + '6-3': [_f('韦驮菩萨圣诞'), _d, _y], + '6-5': [_f('南赡部洲转大轮', ss)], + '6-6': [_f('天地仓开日', ss), _l], + '6-8': [_t], + '6-10': [_f('金粟如来诞')], + '6-14': [_t], + '6-15': [_w, _t], + '6-19': [_f('观世音菩萨成道', dj)], + '6-23': [_f('南方火神诞', '犯者遭回禄'), _t], + '6-24': [_f('雷祖诞', xl), _f('关帝诞', xl)], + '6-25': [_h], + '6-27': [_d], + '6-28': [_r], + '6-29': [_t], + '6-30': [_hh, _m, _t], + '7-1': [_s, _y], + '7-3': [_d], + '7-5': [_f('中会日', ss, false, '一作初七')], + '7-6': [_l], + '7-7': [_f('道德腊', xl), _f('五帝校生人善恶', xl), _f('魁星诞', xl)], + '7-8': [_t], + '7-10': [_f('阴毒日', '', false, '大忌')], + '7-12': [_f('长真谭真人诞')], + '7-13': [_f('大势至菩萨诞', js)], + '7-14': [_f('三元降', js), _t], + '7-15': [_w, _f('三元降', dj),_f('地官校籍', dj), _t], + '7-16': [_f('三元降', js)], + '7-18': [_f('西王母诞', dj)], + '7-19': [_f('太岁诞', dj)], + '7-22': [_f('增福财神诞', xl)], + '7-23': [_t], + '7-25': [_h], + '7-27': [_d], + '7-28': [_r], + '7-29': [_y, _t], + '7-30': [_f('地藏菩萨诞', dj), _hh, _m, _t], + '8-1': [_s, _f('许真君诞')], + '8-3': [_d, _f('北斗诞', xl), _f('司命灶君诞', '犯者遭回禄')], + '8-5': [_f('雷声大帝诞', dj)], + '8-6': [_l], + '8-8': [_t], + '8-10': [_f('北斗大帝诞')], + '8-12': [_f('西方五道诞')], + '8-14': [_t], + '8-15': [_w, _f('太明朝元', '犯者暴亡', false, '宜焚香守夜'), _t], + '8-16': [_f('天曹掠刷真君降', '犯者贫夭')], + '8-18': [_f('天人兴福之辰', '', false, '宜斋戒,存想吉事')], + '8-23': [_f('汉恒候张显王诞'), _t], + '8-24': [_f('灶君夫人诞')], + '8-25': [_h], + '8-27': [_d, _f('至圣先师孔子诞', xl), _y], + '8-28': [_r, _f('四天会事')], + '8-29': [_t], + '8-30': [_f('诸神考校', '犯者夺算'), _hh, _m, _t], + '9-1': [_s, _f('南斗诞', xl), _f('北斗九星降世', dj, false, '此九日俱宜斋戒')], + '9-3': [_d, _f('五瘟神诞')], + '9-6': [_l], + '9-8': [_t], + '9-9': [_f('斗母诞', xl), _f('酆都大帝诞'), _f('玄天上帝飞升')], + '9-10': [_f('斗母降', dj)], + '9-11': [_f('宜戒')], + '9-13': [_f('孟婆尊神诞')], + '9-14': [_t], + '9-15': [_w, _t], + '9-17': [_f('金龙四大王诞', '犯者遭水厄')], + '9-19': [_f('日宫月宫会合', js), _f('观世音菩萨诞', js)], + '9-23': [_t], + '9-25': [_h, _y], + '9-27': [_d], + '9-28': [_r], + '9-29': [_t], + '9-30': [_f('药师琉璃光佛诞', '犯者危疾'), _hh, _m, _t], + '10-1': [_s, _f('民岁腊', dj), _f('四天王降', '犯者一年内死')], + '10-3': [_d, _f('三茅诞')], + '10-5': [_f('下会日', js), _f('达摩祖师诞', js)], + '10-6': [_l, _f('天曹考察', dj)], + '10-8': [_f('佛涅槃日', '', false, '大忌色欲'), _t], + '10-10': [_f('四天王降', '犯者一年内死')], + '10-11': [_f('宜戒')], + '10-14': [_f('三元降', js), _t], + '10-15': [_w, _f('三元降', dj), _f('下元水府校籍', dj), _t], + '10-16': [_f('三元降', js), _t], + '10-23': [_y, _t], + '10-25': [_h], + '10-27': [_d, _f('北极紫徽大帝降')], + '10-28': [_r], + '10-29': [_t], + '10-30': [_hh, _m, _t], + '11-1': [_s], + '11-3': [_d], + '11-4': [_f('至圣先师孔子诞', xl)], + '11-6': [_f('西岳大帝诞')], + '11-8': [_t], + '11-11': [_f('天地仓开日', dj), _f('太乙救苦天尊诞', dj)], + '11-14': [_t], + '11-15': [_f('月望', '上半夜犯男死 下半夜犯女死'), _f('四天王巡行', '上半夜犯男死 下半夜犯女死')], + '11-17': [_f('阿弥陀佛诞')], + '11-19': [_f('太阳日宫诞', '犯者得奇祸')], + '11-21': [_y], + '11-23': [_f('张仙诞', '犯者绝嗣'), _t], + '11-25': [_f('掠刷大夫降', '犯者遭大凶'), _h], + '11-26': [_f('北方五道诞')], + '11-27': [_d], + '11-28': [_r], + '11-29': [_t], + '11-30': [_hh, _m, _t], + '12-1': [_s], + '12-3': [_d], + '12-6': [_f('天地仓开日', js), _l], + '12-7': [_f('掠刷大夫降', '犯者得恶疾')], + '12-8': [_f('王侯腊', dj), _f('释迦如来成佛之辰'), _t, _f('初旬内戊日,亦名王侯腊', dj)], + '12-12': [_f('太素三元君朝真')], + '12-14': [_t], + '12-15': [_w, _t], + '12-16': [_f('南岳大帝诞')], + '12-19': [_y], + '12-20': [_f('天地交道', '犯者促寿')], + '12-21': [_f('天猷上帝诞')], + '12-23': [_f('五岳诞降'), _t], + '12-24': [_f('司今朝天奏人善恶', '犯者得大祸')], + '12-25': [_f('三清玉帝同降,考察善恶', '犯者得奇祸'), _h], + '12-27': [_d], + '12-28': [_r], + '12-29': [_f('华严菩萨诞'), _t], + '12-30': [_f('诸神下降,察访善恶', '犯者男女俱亡')] + }, + getXiu:function(m,d){return _getXiu(m,d);} + } + })(); + var Foto = (function(){ + var _fromYmdHms=function(y,m,d,hour,minute,second){ + return _fromLunar(Lunar.fromYmdHms(y+Foto.DEAD_YEAR-1,m,d,hour,minute,second)); + }; + var _fromLunar=function(lunar){ + return { + _p: { + lunar: lunar + }, + getLunar:function(){return this._p.lunar;}, + getYear:function(){ + var sy = this._p.lunar.getSolar().getYear(); + var y = sy-Foto.DEAD_YEAR; + if(sy===this._p.lunar.getYear()){ + y++; + } + return y; + }, + getMonth:function(){return this._p.lunar.getMonth();}, + getDay:function(){return this._p.lunar.getDay();}, + getYearInChinese:function(){ + var y = this.getYear()+''; + var s = ''; + var zero = '0'.charCodeAt(0); + for(var i=0,j=y.length;i '
        {group_icon}{group_name}
        ', //分组开始标签 + 'g2' => '
        ', //分组内容 + 'g3' => '
        ', //分组结束标签 + + 'l1' => '', //链接结束标签 +); +lists($html); +?> \ No newline at end of file diff --git a/template/baisu/theme.ini b/template/baisu/theme.ini new file mode 100644 index 0000000..ca55d6f --- /dev/null +++ b/template/baisu/theme.ini @@ -0,0 +1,8 @@ +{ + "author_name": "BaiSu", + "author_link": "https://gitee.com/baisucode/baisu-two", + "theme_name": "BaiSu", + "theme_version": "2.0", + "theme_explain": "Onenav主题 六零二开", + "theme_demo": "https://spage.lylme.com/theme/baisu" +} \ No newline at end of file diff --git a/template/default/css/MicroExtendFLF.ttf b/template/default/css/MicroExtendFLF.ttf new file mode 100644 index 0000000..8307d30 Binary files /dev/null and b/template/default/css/MicroExtendFLF.ttf differ diff --git a/template/default/css/font.css b/template/default/css/font.css new file mode 100644 index 0000000..3c64fc7 --- /dev/null +++ b/template/default/css/font.css @@ -0,0 +1,3 @@ +@font-face{font-family:"Micro";src:url('MicroExtendFLF.ttf')} +#show_time{font-family:"Micro";text-align:center;font-weight:bold;font-size:30px;color:#fff;text-shadow:1px 1px 2px #000} +#show_date{text-align:center;font-size:16px;color:#fff;font-weight:bold;margin:10px} \ No newline at end of file diff --git a/template/default/css/style.css b/template/default/css/style.css new file mode 100644 index 0000000..79fd73e --- /dev/null +++ b/template/default/css/style.css @@ -0,0 +1,93 @@ +a:hover{text-decoration:none;font-weight:bold} +a.icp{font-size:12px;color:#bbb;text-align:center} +.navbar .navbar-expand-lg .navbar-light .fixed-top{position:absolute;z-index:10000} +.bottom-cover{background-image:linear-gradient(rgba(255,255,255,0) 0%,rgb(244 248 251 / 0.6) 50%,rgb(244 248 251) 100%)} +.navbar-light .navbar-toggler{color:#fff} +p.content{text-align:center;padding:5px 30px;border-radius:10px;font-size:12px;color:#fff;font-weight:500} +::-webkit-scrollbar{display:none} +.back-to{bottom:55px;overflow:hidden;position:fixed;right:10px;width:110px;z-index:999} +.back-to .back-top{background:url("./images/top.png") no-repeat scroll 0 0 transparent;display:block;float:right;height:50px;margin-left:10px;outline:0 none;text-indent:-9999em;width:50px} +.back-to .back-top:hover{background-position:-50px 0} +.mylist li.col-3 img{display:block;width:45px;height:45px;padding:8px;background:#fff;border:1px solid #eee;border-radius:10px;margin:0 auto} +h2.title{text-align:center;color:#fff;font-size:36px;font-weight:600;text-shadow:1px 1px 8px #504b4b} +body{font-size:14px;background:#f4f8fb;overflow-x:hidden} +a{text-decoration:none} +a:hover{text-decoration:none} +svg.icon{width:14px;height:14px;margin:0 5px 0 8px;vertical-align:-0.15em;fill:currentColor;overflow:hidden} +.navbar-light .navbar-nav .nav-link{color:#fff !important;font-size:16px;font-weight:bold;text-shadow:0px 1px 0px #000} +#search{width:100%;margin:0;padding:0 0 10px;position:relative;z-index:2000;border-radius:5px} +#search form{position:relative;margin-top:15px} +#search-text{width:100%;height:50px;line-height:50px;text-indent:10px;font-size:16px;border-radius:10px;background-color:#fff;border:1px solid #fff;/*box-shadow:0 0.5rem 0.625rem #d4d4d44d;*/transition:0.3s all linear;padding-left:20px} +#search-text:focus{border:1px solid #4e6ef2} +#search-text:hover{border:1px solid #a7aab5} +#search button{position:absolute;top:0;right:0;background:none;border:0;border-radius:20px;width:auto;height:50px;border-radius:0 10px 10px 0;outline:none;background-color:#4e6ef2} +#search button:hover{cursor:pointer;background-color:#4662d9} +#search button i{color:#ddd;font-size:18px} +.search-group{text-align: center;} +.s-current .search-type{padding-left:0;display:block} +.s-current{display:block} +#search-list{position:relative;overflow-x:auto} +#search-list::-webkit-scrollbar{display:none} +.s-type{position:absolute;top:0;left:0;z-index:13;width:75px} +.s-type:hover{height:auto} +.s-type>span{display:block;height:31px;width:75px} +.s-type-list{display:none;position:absolute;top:31px;padding:9pt 0;width:70px;background:#fff;border-radius:5px;box-shadow:0 9px 20px rgba(0,0,0,.16)} +.s-type-list:before{position:absolute;top:-1pc;left:20px;content:'';display:block;width:0;height:0;border:10px solid transparent;border-bottom-color:#fff} +.s-type-list label{display:block;font-size:15px;text-align:center;font-weight:normal;margin-bottom:0;padding:2px 0;cursor:pointer;transition:.3s} +.s-type-list label:hover{background:rgba(136,136,136,.1)} +.s-type-list .tile-lg{color:#fff;width:3pc;height:3pc;font-size:1.25rem;line-height:3rem;border-radius:.3rem;display:block;margin:auto} +.s-type:hover .s-type-list{display:block} +.type-text{position:absolute;left:0;width:75px;padding-left:9pt;font-size:1pc;line-height:31px} +.search-type{white-space:nowrap;margin:0} +.search-type label{margin:0} +.search-type img {width: 14px;height: 14px;margin: 0 5px 0 8px;vertical-align: -0.15em;fill: currentColor;overflow: hidden;} +.search-type li{margin-bottom:10px;display:inline-block;background:#ffffffAD;background:rgba(255,255,255,70%);border-radius:10px} +.search-type li label{display:inline-block;padding:0 11px;font-size:14px;border-radius:3px 3px 0 0;cursor:pointer} +.search-type input:checked+label,.search-type input:hover+label{background-color:#fff;height:50px;border-radius:10px} +#search-text::-webkit-input-placeholder{color:#bbb} +#word{position:absolute;list-style:none;top:55px;left:0px;width:100%;background:rgba(259,259,259,0.9);border-radius:5px;z-index:20000;padding:15px 10px;box-shadow:0 0 10px #aaa} +#word li{height:35px;padding:0 5px;text-indent:30px;background-size:20px;line-height:35px;cursor:pointer;font-size:16px;border-radius:5px} +#word li:hover{background-color:#ddd} +.set-check{margin-top:3px;font-size:9pt} +.set-check label{margin-left:3px} +.set-check input,.set-check label{opacity:0;transition:all .3s ease} +.search-type li{height:50px;line-height:50px;list-style:none;display:inline-block;border-radius:10px} +.mylist{list-style:none;padding:10px 20px;position:relative;z-index:1000;margin:20px 0;border-radius:15px;background:#ffffffe6;/*backdrop-filter: blur(10px);*/box-shadow:0 0.5rem 0.625rem #d4d4d44d} +.mylist li.col-3{width:100px;transition:0.3s all linear;font-size:14px;overflow:hidden;padding:10px 0;border-radius:10px} +.mylist li.col-3 svg{display:block;width:45px;height:45px;padding:8px;background:#fff;border:1px solid #eee;border-radius:10px;margin:0 auto} +.mylist li.col-3:hover{background:#eee} +.mylist li.col-3 span{width:100%;height:26px;line-height:26px;text-align:center;font-size:13px;word-break:break-all;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden} +.mylist li a{color:#555;display:block} +.mylist li.title{width:100%;min-width:auto;margin:0;height:35px;font-size:16px;line-height:33px;padding:0 20px 0 10px;/*border-bottom:1px solid #eee;*/margin-bottom:10px} +.banner-video{position:absolute;width:100%;overflow:hidden;left:0;top:0;height:100vh} +.banner-video video{width:2048px;float:left} +.banner-video img{object-fit:cover;width:100%;height:100vh} +.bottom-cover{width:100%;height:50%;position:absolute;bottom:-1px;z-index:10} +@media screen and (min-width:1200px){.mylist li.col-3{min-width:132px} +}@media screen and (min-width:992px) and (max-width:1200px){.mylist li.col-3{min-width:110px} +}@media screen and (max-width:992px){#he-plugin-simple{display:none} +.banner-video video{width:1200px} +.banner-video img{object-fit:cover;width:100%;height:100vh} +.search-group{padding-left:0px} +div#navbarsExample05{background:rgba(0,0,0,0.8);padding:10px 30px;border-radius:20px} +}@media screen and (max-width:767px){.banner-video video{width:960px} +.banner-video img{object-fit:cover;width:100%;height:100vh} +.s-type-list label{padding:5px 0} +.search-list{height:30px;overflow-y:hidden;white-space:nowrap} +.search-group{padding-left:0px} +.mylist{border-radius:8px} +.mylist li.col-3{margin:5px 0 5px} +.mylist li.col-3 svg{width:30px;height:30px;padding:5px;border-radius:5px} +.mylist li.col-3 span{font-size:12px} +.mylist li.col-3 img {display: block; width: 30px; height: 30px; padding: 5px; background: #fff; border: 1px solid #eee; border-radius: 10px; margin: 0 auto;} +}.navbar-toggler svg{width:24px;height:24px} +.navbar-toggler .bi-list-nested{display:none} +.navbar-toggler.collapsed .bi-list-nested{display:block} +.navbar-toggler.collapsed .bi-x{display:none} +.navbar-toggler .bi-x{display:block} +#he-plugin-simple{z-index:1000} +::-webkit-scrollbar{width:8px;height:8px;border-radius:4px} +::-webkit-scrollbar-track{background:#eee;border-radius:0px} +::-webkit-scrollbar-thumb{background:#ddd;border-radius:0px} +::-webkit-scrollbar-thumb:hover{background:#ccc} +::-webkit-scrollbar-corner{background:#ddd} \ No newline at end of file diff --git a/template/default/css/tag.css b/template/default/css/tag.css new file mode 100644 index 0000000..cda1bd4 --- /dev/null +++ b/template/default/css/tag.css @@ -0,0 +1,27 @@ +.box{margin:40px 0;position:fixed;z-index:1000} +.change-type{min-width:40px;min-height:160px;position:absolute;z-index:99;left:0;top:0;display:flex} +.change-type .type-left{width:0;background:#fff;height:100%;box-shadow:0 2px 12px 0 rgb(0 0 0 / 50%);border-bottom-right-radius:5px;border-top-right-radius:5px;margin-left:-40px;overflow:hidden;transition:width 0.4s;-moz-transition:width 0.4s;-webkit-transition:width 0.4s;-o-transition:width 0.4s} +.change-type .showListType{width:150px;transition:width 0.4s;-moz-transition:width 0.4s;-webkit-transition:width 0.4s;-o-transition:width 0.4s} +.change-type .type-left ul{margin-bottom:0px} +.change-type .type-left ul li{line-height:40px;height:40px;text-align:left;width:100%;position:relative;cursor:pointer;list-style:none} +.change-type .type-left ul li a{display:block;height:100%;position:absolute;left:0;top:0;z-index:9;padding-left:15px;overflow:hidden;width:calc(100% - 17px);color:#333;font-size:14px;border-left:2px solid #26778d} +.change-type .type-left ul li span{display:block;position:absolute;width:0;height:100%;left:0;top:0;z-index:8;overflow:hidden;transition:width 0.5s;-moz-transition:width 0.5s;-webkit-transition:width 0.5s;-o-transition:width 0.5s} +.change-type .type-left ul li:hover span{transition:width 0.5s;-moz-transition:width 0.5s;-webkit-transition:width 0.5s;-o-transition:width 0.5s} +.type-left ul li:nth-child(1):hover span,.type-left ul li:nth-child(1).active span,.type-left ul li:nth-child(8):hover span,.type-left ul li:nth-child(8).active span{background:#2C73D2;width:100%;box-shadow:0px 2px 5px 0 rgba(0,0,0,0.5)} +.type-left ul li:nth-child(1):hover a,.type-left ul li:nth-child(1).active a,.type-left ul li:nth-child(8):hover a,.type-left ul li:nth-child(8).active a{border-left:2px solid #2C73D2;color:#fff} +.type-left ul li:nth-child(2):hover span,.type-left ul li:nth-child(2).active span,.type-left ul li:nth-child(9):hover span,.type-left ul li:nth-child(9).active span{background:#D65DB1;width:100%;box-shadow:0px 2px 5px 0 rgba(0,0,0,0.5)} +.type-left ul li:nth-child(2):hover a,.type-left ul li:nth-child(2).active a,.type-left ul li:nth-child(9):hover a,.type-left ul li:nth-child(9).active a{border-left:2px solid #D65DB1;color:#fff} +.type-left ul li:nth-child(3):hover span,.type-left ul li:nth-child(3).active span,.type-left ul li:nth-child(10):hover span,.type-left ul li:nth-child(10).active span{background:#00C9A7;width:100%;box-shadow:0px 2px 5px 0 rgba(0,0,0,0.5)} +.type-left ul li:nth-child(3):hover a,.type-left ul li:nth-child(3).active a,.type-left ul li:nth-child(10):hover a,.type-left ul li:nth-child(10).active a{border-left:2px solid #00C9A7;color:#fff} +.type-left ul li:nth-child(4):hover span,.type-left ul li:nth-child(4).active span,.type-left ul li:nth-child(11):hover span,.type-left ul li:nth-child(11).active span{background:#009EFA;width:100%;box-shadow:0px 2px 5px 0 rgba(0,0,0,0.5)} +.type-left ul li:nth-child(4):hover a,.type-left ul li:nth-child(4).active a,.type-left ul li:nth-child(11):hover a,.type-left ul li:nth-child(11).active a{border-left:2px solid #009EFA;color:#fff} +.type-left ul li:nth-child(5):hover span,.type-left ul li:nth-child(5).active span,.type-left ul li:nth-child(12):hover span,.type-left ul li:nth-child(12).active span{background:#FF8066;width:100%;box-shadow:0px 2px 5px 0 rgba(0,0,0,0.5)} +.type-left ul li:nth-child(5):hover a,.type-left ul li:nth-child(5).active a,.type-left ul li:nth-child(12):hover a,.type-left ul li:nth-child(12).active a{border-left:2px solid #FF8066;color:#fff} +.type-left ul li:nth-child(6):hover span,.type-left ul li:nth-child(6).active span,.type-left ul li:nth-child(13):hover span,.type-left ul li:nth-child(13).active span{background:#64b5f6;width:100%;box-shadow:0px 2px 5px 0 rgba(0,0,0,0.5)} +.type-left ul li:nth-child(6):hover a,.type-left ul li:nth-child(6).active a,.type-left ul li:nth-child(13):hover a,.type-left ul li:nth-child(13).active a{border-left:2px solid #64b5f6;color:#fff} +.type-left ul li:nth-child(7):hover span,.type-left ul li:nth-child(7).active span,.type-left ul li:nth-child(14):hover span,.type-left ul li:nth-child(14).active span{background:#388e3c;width:100%;box-shadow:0px 2px 5px 0 rgba(0,0,0,0.5)} +.type-left ul li:nth-child(7):hover a,.type-left ul li:nth-child(7).active a,.type-left ul li:nth-child(14):hover a,.type-left ul li:nth-child(14).active a{border-left:2px solid #388e3c;color:#fff} +ul.navbar-nav.mr-auto{margin-left:60px} +.type-right{position:fixed;top:38px} +.type-right svg{width:28px;height:28px} +@media screen and (max-width:992px){.type-right{position:fixed;top:10px;right:10px}} diff --git a/template/default/footer.php b/template/default/footer.php new file mode 100644 index 0000000..d0aaa95 --- /dev/null +++ b/template/default/footer.php @@ -0,0 +1,17 @@ + + + + + + + \ No newline at end of file diff --git a/template/default/index.php b/template/default/index.php new file mode 100644 index 0000000..68fb751 --- /dev/null +++ b/template/default/index.php @@ -0,0 +1,149 @@ + + + + + + <?php echo $conf['title']?> + + + + + + + + + + + + + + + + + + + + +
        +
        +
        +
          +
        • 搜索
        • +query("SELECT * FROM `lylme_groups` ORDER BY `group_order` ASC"); // 获取分类 +while ($group = $DB->fetch($groups)) { //循环所有分组 + + echo '
        • '. $group["group_name"] . '
        • '."\n"; + } + ?> +
        +
        + +
        +
        + + + + +
        + ' . yan().'

        '; + } + ?> + + + + diff --git a/template/default/js/script.js b/template/default/js/script.js new file mode 100644 index 0000000..6e4a4a8 --- /dev/null +++ b/template/default/js/script.js @@ -0,0 +1,180 @@ +//天气插件 +WIDGET={"CONFIG":{"modules":"12043","background":"5","tmpColor":"FFFFFF","tmpSize":"16","cityColor":"FFFFFF","citySize":"18","aqiColor":"FFFFFF","aqiSize":"16","weatherIconSize":"24","alertIconSize":"18","padding":"0px 0px 0px 0px","shadow":"0","language":"auto","fixed":"false","vertical":"center","horizontal":"center","right":"0","top":"0","key":"9d714f8dd6b94c7696f9cea8dc3ed1c5"}} + + +//输入框获取焦点 +window.onload= function () { + var text=document.getElementById('search-text'); + text.focus(); + +} + +//关键词sug +$(function() { + //当键盘键被松开时发送Ajax获取数据 + $('#search-text').keyup(function() { + var keywords = $(this).val(); + if (keywords == '') { $('#word').hide(); return }; + $.ajax({ + url: 'https://suggestion.baidu.com/su?wd=' + keywords, + dataType: 'jsonp', + jsonp: 'cb', //回调函数的参数名(键值)key + // jsonpCallback: 'fun', //回调函数名(值) value + beforeSend: function() { + // $('#word').append('
      • 正在加载。。。
      • '); + }, + success: function(data) { + $('#word').empty().show(); + if (data.s == '') { + // $('#word').append('
        暂无 ' + keywords + ' 相关索引
        '); + $('#word').empty(); + $('#word').hide(); + } + $.each(data.s, function() { + $('#word').append('
      • ' + this + '
      • '); + }) + }, + error: function() { + $('#word').empty().show(); + //$('#word').append('
        Fail "' + keywords + '"
        '); + $('#word').hide(); + } + }) + }) + //点击搜索数据复制给搜索框 + $(document).on('click', '#word li', function() { + var word = $(this).text(); + $('#search-text').val(word); + $('#word').empty(); + $('#word').hide(); + //$("form").submit(); + $('.submit').trigger('click');//触发搜索事件 + }) + $(document).on('click', '.container,.banner-video,nav', function() { + $('#word').empty(); + $('#word').hide(); + }) +}) + +$(function(){ + $('.type-right').click(function(e){ + $('#type-left').toggleClass('showListType'); + e.stopPropagation(); //阻止冒泡 + }); + + $(document).click(function(e){ + var con = $('.type-left'); + if(!con.is(e.target)){ + con.toggleClass('showListType',false); + } + }); + $(document).click(function(e){ + var con = $('.collapse'); + if(!con.is(e.target)){ + con.toggleClass('show',false); + } + }); + $('.type-left ul li').click(function(){ + $(this).addClass('active').siblings('li').removeClass('active'); + $('.type-left').toggleClass('showListType'); + var lylme_tag = '#'+$(this).attr("data-lylme"); + $('html,body').animate({scrollTop:$(lylme_tag).offset().top},500); + + }) +}) + +//点击空白处关闭导航 + +//显示日期和时间 +function show() { + var date = new Date(); + var y = date.getFullYear(); //获取年份 + var m =date.getMonth()+1; //获取月份 返回0-11 + var d = date.getDate(); // 获取日 + var w = date.getDay(); //获取星期几 返回0-6 (0=星期天) + var ww = ' 星期'+'日一二三四五六'.charAt(new Date().getDay()) ;//星期几 + var format = [ + ("0" + date.getHours()).substr(-2), ("0" + date.getMinutes()).substr(-2) + ].join(":"); + + document.getElementById("show_date").innerHTML = y+"年"+m+"月"+d+"日 "+ww; + document.getElementById("show_time").innerHTML = format; + return show; +} +setInterval(show(), 500); + + +! +function() { + function g() { + h(), i(), j(), k() + } + function h() { + d.checked = s() + } + function i() { + var a = document.querySelector('input[name="type"][value="' + p() + '"]'); + a && (a.checked = !0, l(a)) + } + function j() { + v(u()) + } + function k() { + w(t()) + } + function l(a) { + for (var b = 0; b < e.length; b++) e[b].classList.remove("s-current"); + a.parentNode.parentNode.parentNode.classList.add("s-current") + } + function m(a, b) { + window.localStorage.setItem("superSearch" + a, b) + } + function n(a) { + return window.localStorage.getItem("superSearch" + a) + } + function o(a) { + f = a.target, v(u()), w(a.target.value), m("type", a.target.value), c.focus(), l(a.target) + } + function p() { + var b = n("type"); + return b || a[0].value + } + function q(a) { + m("newWindow", a.target.checked ? 1 : -1), x(a.target.checked) + } + function r(a) { + return a.preventDefault(), "" == c.value ? (c.focus(), !1) : (w(t() + c.value), x(s()), s() ? window.open(b.action, +new Date) : location.href = b.action, void 0) + } + function s() { + var a = n("newWindow"); + return a ? 1 == a : !0 + } + function t() { + return document.querySelector('input[name="type"]:checked').value + } + function u() { + return document.querySelector('input[name="type"]:checked').getAttribute("data-placeholder") + } + function v(a) { + c.setAttribute("placeholder", a); + } + function w(a) { + b.action = a + } + function x(a) { + a ? b.target = "_blank" : b.removeAttribute("target") + } + var y, a = document.querySelectorAll('input[name="type"]'), + b = document.querySelector("#super-search-fm"), + c = document.querySelector("#search-text"), + c = document.querySelector("#search-text"), + d = document.querySelector("#set-search-blank"), + e = document.querySelectorAll(".search-group"), + f = a[0]; + for (g(), y = 0; y < a.length; y++) a[y].addEventListener("change", o); + d.addEventListener("change", q), b.addEventListener("submit", r) + +}(); + +//返回顶部 +(function(a){a.fn.scrollToTop=function(c){var d={speed:800};c&&a.extend(d,{speed:c});return this.each(function(){var b=a(this);a(window).scroll(function(){100';$("body").append(ahtml);$("#toTop").scrollToTop(300);}); \ No newline at end of file diff --git a/template/default/list.php b/template/default/list.php new file mode 100644 index 0000000..37e70fb --- /dev/null +++ b/template/default/list.php @@ -0,0 +1,13 @@ + '
          ', //分组开始标签 + 'g2' => '
        • {group_icon}{group_name}
        • ', //分组内容 + 'g3' => '
        ', //分组结束标签 + + 'l1' => '
      • ', //链接开始标签 + 'l2' => '{link_icon}{link_name}', //链接内容 + 'l3' => '
      • ', //链接结束标签 +); +lists($html); +?> \ No newline at end of file diff --git a/template/default/theme.ini b/template/default/theme.ini new file mode 100644 index 0000000..34c806a --- /dev/null +++ b/template/default/theme.ini @@ -0,0 +1,8 @@ +{ + "author_name": "六零二开", + "author_link": "https://gitee.com/lylme", + "theme_name": "default", + "theme_version": "2.0", + "theme_explain": "默认主题", + "theme_demo": "https://spage.lylme.com/theme/default" +} \ No newline at end of file diff --git a/template/lylme/css/style.css b/template/lylme/css/style.css new file mode 100644 index 0000000..efb3e22 --- /dev/null +++ b/template/lylme/css/style.css @@ -0,0 +1,715 @@ +#search-text +{ + /* backdrop-filter: saturate(100%) blur(10px); */ + border: 0; + width: 80%; + /*height: 60px; */ + /* line-height: 50px; */ + /* text-indent: 10px; */ + font-size: 18px; + color: #222226; + /* border-radius: 15px; */ + background: 0; + /* transition: 0.3s all linear; */ + /* padding-left: 20px; */ + /* box-shadow: 0px 2px 12px 0px rgb(34 34 38 / 10%); */ +} +li.nav-item a { + color: #fff !important; +} +#search-lylme +{ + text-align: initial; + backdrop-filter: saturate(100%) blur(10px); + border: 0; + width: 100%; + margin-bottom: 5px; + line-height: 50px; + text-indent: 10px; + font-size: 18px; + color: #222226; + border-radius: 15px; + background: rgba(255, 255, 255, 0.5); + transition: 0.3s all linear; + padding-left: 10px; + box-shadow: 0px 2px 12px 0px rgb(34 34 38 / 10%); +} + +#search-text::-webkit-input-placeholder +{ + color: #555666; + font-size: 16px; +} + +#search-submit +{ + position: absolute; + top: 0; + right: 0; + background: none; + border: 0; + /* border-radius: 20px; */ + width: auto; + /*height: 60px;*/ + border-radius: 0 10px 10px 0; + outline: none; + /* background-color: #4e6ef2; */ +} + +#search-submit:hover +{ + background-color: rgba(255, 255, 255, 0.342) +} + +.search-box +{ + justify-content: center; + align-items: center; + /*height: 60px;*/ +} + +#main +{ + text-shadow: 0px 0px 3px rgb(0 0 0 / 70%); + text-align: center; + color: white; + font-weight: bold; +} + +#show_time +{ + font-size: 80px; +} + +#show_date +{ + margin-bottom: 16px; + font-size: 18px; + color: #fff; +} + +#checke-so +{ + display: inline; +} + +a:hover +{ + text-decoration: none !important; + font-weight: bold !important +} + +a.icp +{ + font-size: 12px; + color: #bbb; + text-align: center +} + +.navbar .navbar-expand-lg .navbar-light .fixed-top +{ + position: absolute; + z-index: 10000 +} + +.bottom-cover +{ + background-image: linear-gradient(rgba(255,255,255,0) 0%,rgb(244 248 251 / 0.6) 50%,rgb(244 248 251) 100%) +} + +.navbar-light .navbar-toggler +{ + color: #fff !important +} + +p.content +{ + text-align: center; + padding: 5px 30px; + border-radius: 10px; + font-size: 12px; + color: #fff; + font-weight: 500 +} + +::-webkit-scrollbar +{ + display: none +} + +.back-to +{ + bottom: 55px; + overflow: hidden; + position: fixed; + right: 10px; + width: 110px; + z-index: 999 +} + +.back-to .back-top +{ + background: url("./images/top.png") no-repeat scroll 0 0 transparent; + display: block; + float: right; + height: 50px; + margin-left: 10px; + outline: 0 none; + text-indent: -9999em; + width: 50px +} + +.back-to .back-top:hover +{ + background-position: -50px 0 +} + +.mylist li.lylme-3 img +{ + display: block; + width: 45px; + height: 45px; + padding: 8px; + background: #fff; + border: 1px solid #eee; + border-radius: 10px; + margin: 25px auto +} + +h2.title +{ + text-align: center; + color: #fff; + font-size: 36px; + font-weight: 600; + text-shadow: 1px 1px 8px #504b4b +} + +body +{ + font-size: 14px; + background: #95aec5; + overflow-x: hidden; + background-repeat: no-repeat; + background-attachment: fixed; +} + +a +{ + text-decoration: none +} + +a:hover +{ + text-decoration: none +} + +svg.icon +{ + width: 20px; + height: 20px; + margin: 0 5px 0 8px; + /* vertical-align: -0.15em; */ + fill: currentColor; + overflow: hidden; +} + +svg.sw +{ + width: 16px; + height: 16px; + margin: 5px; +} + +svg.lylme +{ + width: 20px; + height: 20px; +} + +ul#chso +{ + position: inherit; + display: none; + top: 5px +} + +.navbar-light .navbar-nav .nav-link +{ + color: #fff !important; + font-size: 16px; + font-weight: bold; + text-shadow: 0px 1px 0px #000 +} + +#search +{ + width: 100%; + margin: 0; + padding: 0 0 10px; + position: relative; + z-index: 2000; + border-radius: 5px +} + +#search form +{ + position: relative; + margin-top: 15px +} + +#search button i +{ + color: #ddd; + font-size: 18px +} + +.search-group +{ + text-align: center; +} + +.s-current .search-type +{ + padding-left: 0; + display: block +} + +.s-current +{ + display: block +} + +#search-list +{ + position: relative; + overflow-x: auto +} + +#search-list::-webkit-scrollbar +{ + display: none +} + +.s-type +{ + position: absolute; + top: 0; + left: 0; + z-index: 13; + width: 75px +} + +.s-type:hover +{ + height: auto +} + +.s-type>span +{ + display: block; + height: 31px; + width: 75px +} + +.s-type-list +{ + display: none; + position: absolute; + top: 31px; + padding: 9pt 0; + width: 70px; + background: #fff; + border-radius: 5px; + box-shadow: 0 9px 20px rgba(0,0,0,.16) +} + +.s-type-list:before +{ + position: absolute; + top: -1pc; + left: 20px; + content: ''; + display: block; + width: 0; + height: 0; + border: 10px solid transparent; + border-bottom-color: #fff +} + +.s-type-list label +{ + display: block; + font-size: 15px; + text-align: center; + font-weight: normal; + margin-bottom: 0; + padding: 2px 0; + cursor: pointer; + transition: .3s +} + +.s-type-list label:hover +{ + background: rgba(136,136,136,.1) +} + +.s-type-list .tile-lg +{ + color: #fff; + width: 3pc; + height: 3pc; + font-size: 1.25rem; + line-height: 3rem; + border-radius: .3rem; + display: block; + margin: auto +} + +.s-type:hover .s-type-list +{ + display: block +} + +.type-text +{ + position: absolute; + left: 0; + width: 75px; + padding-left: 9pt; + font-size: 1pc; + line-height: 31px +} + +.search-type +{ + white-space: nowrap; + margin: 0 +} + +.search-type label +{ + margin: 0 +} + +.search-type img +{ + width: 14px; + height: 14px; + margin: 0 5px 0 8px; + vertical-align: -0.15em; + fill: currentColor; + overflow: hidden; +} + +.search-type li +{ + margin-bottom: 10px; + display: inline-block; + background: #ffffffAD !important; + background: rgba(255,255,255,70%); + border-radius: 10px +} + +.search-type li label +{ + display: inline-block; + padding: 0 11px; + font-size: 14px; + border-radius: 3px 3px 0 0; + cursor: pointer +} + +.search-type input:checked+label,.search-type input:hover+label +{ + background-color: #fff; + height: 50px; + border-radius: 10px +} + +#word +{ + backdrop-filter: blur(10px); + margin-top: 5px; + position: absolute; + list-style: none; + width: 100%; + background: rgba(259,259,259,0.6); + border-radius: 15px; + z-index: 20000; + padding: 15px 0px; + box-shadow: 0 0 5px #000 +} + +#word li +{ + height: 35px; + padding: 0 5px; + text-indent: 30px; + background-size: 20px; + line-height: 35px; + cursor: pointer; + font-size: 16px; + border-radius: 5px +} + +#word li:hover +{ + background-color: #fffc +} + +.set-check +{ + position: absolute; +} + +.set-check label +{ + margin-left: 3px +} + +.set-check input,.set-check label +{ + opacity: 0; + transition: all .3s ease +} + +.search-type li +{ + height: 50px; + line-height: 50px; + list-style: none; + display: inline-block; + border-radius: 10px +} + +.mylist +{ + list-style: none; + position: relative; + z-index: 1000; +} + +.mylist li.lylme-3 +{ + width: 100px; + transition: 0.3s all linear; + font-size: 14px; + overflow: hidden; + /* padding: 10px; */ + box-shadow: 2px 2px 10px 0px rgb(0 0 0 / 40%); + backdrop-filter: saturate(100%) blur(30px); + margin: 10px; + /* display: flex; */ + flex-direction: row; + border-radius: 15px; +} + +.mylist li.lylme-3 svg +{ + display: block; + width: 45px; + height: 45px; + margin: 25px auto; +} + +.mylist li.lylme-3:hover +{ + backdrop-filter: blur(0px); + transform: translateY(5px); +} + +.mylist li.lylme-3 span +{ + text-shadow: 0px 0px 3px rgb(0 0 0 / 70%); + margin-bottom: 10px; + width: 100%; + height: 26px; + line-height: 26px; + text-align: center; + font-size: 15px; + word-break: break-all; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden +} + +.mylist li a +{ + color: #fff; + display: block +} + +.mylist li.title +{ + width: 100%; + min-width: auto; + /* margin: 0; */ + height: 35px; + /* font-size: 16px; */ + line-height: 33px; + /* padding: 0 20px 0 10px; */ + /* border-bottom: 1px solid #eee; */ + margin-bottom: 10px; + margin-top: 20px; + font-size: 17px; + color: white; + font-weight: 600; +} + +.bottom-cover +{ + width: 100%; + height: 50%; + position: absolute; + bottom: -1px; + z-index: 10 +} + +@media screen and (min-width:1200px) +{ + .mylist li.lylme-3 + { + min-width: 132px + } +} + +@media screen and (min-width:992px) and (max-width:1200px) +{ + .mylist li.lylme-3 + { + min-width: 110px + } +} + +@media screen and (max-width:992px) +{ + #he-plugin-simple + { + display: none !important + } + + #search-text + { + width: 60%; + } + + .mylist li.lylme-3 + { + width: 65px; + } + + .search-group + { + padding-left: 0px + } + + div#navbarsExample05 + { + background: rgba(0,0,0,0.8); + padding: 10px 30px; + border-radius: 20px + } +} + +@media screen and (max-width:767px) +{ + #search-text + { + width: 60%; + } + + .s-type-list label + { + padding: 5px 0 + } + + .search-list + { + height: 30px; + overflow-y: hidden; + white-space: nowrap + } + + .search-group + { + padding-left: 0px + } + + .mylist + { + border-radius: 8px + } +/*.mylist li.lylme-3{margin:5px 0 5px}*/ + .mylist li.lylme-3 svg + { + width: 40px; + height: 40px; + } + + .mylist li.lylme-3 span + { + font-size: 12px + } +} + +.navbar-toggler svg +{ + width: 24px; + height: 24px +} + +.navbar-toggler .bi-list-nested +{ + display: none +} + +.navbar-toggler.collapsed .bi-list-nested +{ + display: block +} + +.navbar-toggler.collapsed .bi-x +{ + display: none +} + +.navbar-toggler .bi-x +{ + display: block +} + +#he-plugin-simple +{ + z-index: 1000 +} + +::-webkit-scrollbar +{ + width: 8px; + height: 8px; + border-radius: 4px +} + +::-webkit-scrollbar-track +{ + background: #eee; + border-radius: 0px +} + +::-webkit-scrollbar-thumb +{ + background: #ddd; + border-radius: 0px +} + +::-webkit-scrollbar-thumb:hover +{ + background: #ccc +} + +::-webkit-scrollbar-corner +{ + background: #ddd +} \ No newline at end of file diff --git a/template/lylme/footer.php b/template/lylme/footer.php new file mode 100644 index 0000000..787e50f --- /dev/null +++ b/template/lylme/footer.php @@ -0,0 +1,20 @@ + + + + + + + + \ No newline at end of file diff --git a/template/lylme/index.php b/template/lylme/index.php new file mode 100644 index 0000000..7443f6b --- /dev/null +++ b/template/lylme/index.php @@ -0,0 +1,137 @@ + + + + + + <?php echo $conf['title']?> + + + + + + + + + + + + + + + + + + + ';} + else{ echo '';}?> + +
        + + +
        + +
        +
        +
        + +
        +' . yan().'

        '; +} +?> +

        + + + + + diff --git a/template/lylme/js/script.js b/template/lylme/js/script.js new file mode 100644 index 0000000..5009c59 --- /dev/null +++ b/template/lylme/js/script.js @@ -0,0 +1,182 @@ +//天气插件 +WIDGET={"CONFIG":{"modules":"12043","background":"5","tmpColor":"FFFFFF","tmpSize":"16","cityColor":"FFFFFF","citySize":"18","aqiColor":"FFFFFF","aqiSize":"16","weatherIconSize":"24","alertIconSize":"18","padding":"0px 0px 0px 0px","shadow":"0","language":"auto","fixed":"false","vertical":"center","horizontal":"center","right":"0","top":"0","key":"9d714f8dd6b94c7696f9cea8dc3ed1c5"}} + + +//输入框获取焦点 +window.onload= function () { + var text=document.getElementById('search-text'); + text.focus(); + +} +function lylme(){ + var up = document.getElementById('lylme-up'); + var down = document.getElementById('lylme-down'); + var lylme = document.getElementById('chso'); + var upsw = up.style.display; + var downsw = down.style.display; + if(upsw=='none'){ + up.style.display='inline'; + down.style.display='none'; + lylme.style.display='none'; + + + } + else{ + up.style.display='none'; + down.style.display='inline'; + lylme.style.display='contents'; + } + +} +$(document).on('click', '.search-type li', function(){ + var icon=$(this).find('svg').html() //|| $(this).find('img')[0].outerHTML; + $(".lylme").html(icon); +}); + +//关键词sug +$(function() { + //当键盘键被松开时发送Ajax获取数据 + $('#search-text').keyup(function() { + var keywords = $(this).val(); + if (keywords == '') { $('#word').hide(); return }; + $.ajax({ + url: 'https://suggestion.baidu.com/su?wd=' + keywords, + dataType: 'jsonp', + jsonp: 'cb', //回调函数的参数名(键值)key + // jsonpCallback: 'fun', //回调函数名(值) value + beforeSend: function() { + // $('#word').append('
      • 正在加载。。。
      • '); + }, + success: function(data) { + $('#word').empty().show(); + if (data.s == '') { + // $('#word').append('
        暂无 ' + keywords + ' 相关索引
        '); + $('#word').empty(); + $('#word').hide(); + } + $.each(data.s, function() { + $('#word').append('
      • ' + this + '
      • '); + }) + }, + error: function() { + $('#word').empty().show(); + //$('#word').append('
        Fail "' + keywords + '"
        '); + $('#word').hide(); + } + }) + }) + //点击搜索数据复制给搜索框 + $(document).on('click', '#word li', function() { + var word = $(this).text(); + $('#search-text').val(word); + $('#word').empty(); + $('#word').hide(); + //$("form").submit(); + $('.submit').trigger('click');//触发搜索事件 + }) + $(document).on('click', '.container,.banner-video,nav', function() { + $('#word').empty(); + $('#word').hide(); + }) + +}) + + + +//显示日期和时间 +function show() { + var date = new Date(); + var y = date.getFullYear(); //获取年份 + var m =date.getMonth()+1; //获取月份 返回0-11 + var d = date.getDate(); // 获取日 + var w = date.getDay(); //获取星期几 返回0-6 (0=星期天) + var ww = ' 星期'+'日一二三四五六'.charAt(new Date().getDay()) ;//星期几 + var format = [ + ("0" + date.getHours()).substr(-2), ("0" + date.getMinutes()).substr(-2) + ].join(":"); + + document.getElementById("show_date").innerHTML = y+"年"+m+"月"+d+"日 "+ww; + document.getElementById("show_time").innerHTML = format; + return show; +} +setInterval(show(), 500); + + +! +function() { + function g() { + h(), i(), j(), k() + } + function h() { + d.checked = s() + } + function i() { + var a = document.querySelector('input[name="type"][value="' + p() + '"]'); + a && (a.checked = !0, l(a)) + } + function j() { + v(u()) + } + function k() { + w(t()) + } + function l(a) { + for (var b = 0; b < e.length; b++) e[b].classList.remove("s-current"); + a.parentNode.parentNode.parentNode.classList.add("s-current") + } + function m(a, b) { + window.localStorage.setItem("superSearch" + a, b) + } + function n(a) { + return window.localStorage.getItem("superSearch" + a) + } + function o(a) { + f = a.target, v(u()), w(a.target.value), m("type", a.target.value), c.focus(), l(a.target) + } + function p() { + var b = n("type"); + return b || a[0].value + } + function q(a) { + m("newWindow", a.target.checked ? 1 : -1), x(a.target.checked) + } + function r(a) { + return a.preventDefault(), "" == c.value ? (c.focus(), !1) : (w(t() + c.value), x(s()), s() ? window.open(b.action, +new Date) : location.href = b.action, void 0) + } + function s() { + var a = n("newWindow"); + return a ? 1 == a : !0 + } + function t() { + return document.querySelector('input[name="type"]:checked').value + } + function u() { + return document.querySelector('input[name="type"]:checked').getAttribute("data-placeholder") + } + function v(a) { + c.setAttribute("placeholder", a); + document.getElementById('chso').style.display='none'; + document.getElementById('lylme-up').style.display='inline'; + document.getElementById('lylme-down').style.display='none'; + + } + function w(a) { + b.action = a + } + function x(a) { + a ? b.target = "_blank" : b.removeAttribute("target") + } + var y, a = document.querySelectorAll('input[name="type"]'), + b = document.querySelector("#super-search-fm"), + c = document.querySelector("#search-text"), + c = document.querySelector("#search-text"), + d = document.querySelector("#set-search-blank"), + e = document.querySelectorAll(".search-group"), + f = a[0]; + for (g(), y = 0; y < a.length; y++) a[y].addEventListener("change", o); + d.addEventListener("change", q), b.addEventListener("submit", r) + +}(); + +//返回顶部 +(function(a){a.fn.scrollToTop=function(c){var d={speed:800};c&&a.extend(d,{speed:c});return this.each(function(){var b=a(this);a(window).scroll(function(){100';$("body").append(ahtml);$("#toTop").scrollToTop(300);}); \ No newline at end of file diff --git a/template/lylme/list.php b/template/lylme/list.php new file mode 100644 index 0000000..a8333d1 --- /dev/null +++ b/template/lylme/list.php @@ -0,0 +1,13 @@ + '
          ', //分组开始标签 + 'g2' => '
        • {group_icon}{group_name}
        • ', //分组内容 + 'g3' => '
        ', //分组结束标签 + + 'l1' => '
      • ', //链接开始标签 + 'l2' => '{link_icon}{link_name}', //链接内容 + 'l3' => '
      • ', //链接结束标签 +); +lists($html); +?> \ No newline at end of file diff --git a/template/lylme/theme.ini b/template/lylme/theme.ini new file mode 100644 index 0000000..8fb9af5 --- /dev/null +++ b/template/lylme/theme.ini @@ -0,0 +1,8 @@ +{ + "author_name": "六零", + "author_link": "https://gitee.com/lylme", + "theme_name": "LyLme", + "theme_version": "2.0", + "theme_explain": "基于default主题开发", + "theme_demo": "https://spage.lylme.com/theme/lylme" +} \ No newline at end of file diff --git a/template/page/css/main.css b/template/page/css/main.css new file mode 100644 index 0000000..716e470 --- /dev/null +++ b/template/page/css/main.css @@ -0,0 +1,1315 @@ +@import url(https://cdn.bootcss.com/font-awesome/4.5.0/css/font-awesome.min.css); +/* + Dimension by HTML5 UP + html5up.net | @ajlkn + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ +/* Reset */ + html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; + } + article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { + display: block; + } + body { + line-height: 1; + } + ol, ul { + list-style: none; + } + blockquote, q { + quotes: none; + } + blockquote:before, blockquote:after, q:before, q:after { + content: ''; + content: none; + } + table { + border-collapse: collapse; + border-spacing: 0; + } + body { + -webkit-text-size-adjust: none; + } +/* Box Model */ + *, *:before, *:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + } +/* Basic */ + @-ms-viewport { + width: device-width; + } + @media screen and (max-width: 480px) { + html, body { + min-width: 320px; + } + } + body { + background: #1b1f22; + } + body.is-loading *, body.is-loading *:before, body.is-loading *:after, body.is-switching *, body.is-switching *:before, body.is-switching *:after { + -moz-animation: none !important; + -webkit-animation: none !important; + -ms-animation: none !important; + animation: none !important; + -moz-transition: none !important; + -webkit-transition: none !important; + -ms-transition: none !important; + transition: none !important; + -moz-transition-delay: none !important; + -webkit-transition-delay: none !important; + -ms-transition-delay: none !important; + transition-delay: none !important; + } +/* Type */ + html { + font-size: 16pt; + } + @media screen and (max-width: 1680px) { + html { + font-size: 12pt; + } + } + @media screen and (max-width: 736px) { + html { + font-size: 11pt; + } + } + @media screen and (max-width: 360px) { + html { + font-size: 10pt; + } + } + body, input, select, textarea { + color: #ffffff; + font-family: "Source Sans Pro", sans-serif; + font-weight: 300; + font-size: 1rem; + line-height: 1.65; + } + a { + -moz-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out; + -webkit-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out; + -ms-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out; + transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out; + border-bottom: dotted 1px rgba(255, 255, 255, 0.5); + text-decoration: none; + color: inherit; + } + a:hover { + border-bottom-color: transparent; + } + strong, b { + color: #ffffff; + font-weight: 600; + } + em, i { + font-style: italic; + } + p { + margin: 0 0 2rem 0; + } + h1, h2, h3, h4, h5, h6 { + color: #ffffff; + font-weight: 600; + line-height: 1.5; + margin: 0 0 1rem 0; + text-transform: uppercase; + letter-spacing: 0.2rem; + } + h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { + color: inherit; + text-decoration: none; + } + h1.major, h2.major, h3.major, h4.major, h5.major, h6.major { + border-bottom: solid 1px #ffffff; + width: -moz-max-content; + width: -webkit-max-content; + width: -ms-max-content; + width: max-content; + padding-bottom: 0.5rem; + margin: 0 0 2rem 0; + } + h1 { + font-size: 2.25rem; + line-height: 1.3; + letter-spacing: 0.5rem; + } + h2 { + font-size: 1.5rem; + line-height: 1.4; + letter-spacing: 0.5rem; + } + h3 { + font-size: 1rem; + } + h4 { + font-size: 0.8rem; + } + h5 { + font-size: 0.7rem; + } + h6 { + font-size: 0.6rem; + } + @media screen and (max-width: 736px) { + h1 { + font-size: 1.75rem; + line-height: 1.4; + } + h2 { + font-size: 1.25em; + line-height: 1.5; + } + } + sub { + font-size: 0.8rem; + position: relative; + top: 0.5rem; + } + sup { + font-size: 0.8rem; + position: relative; + top: -0.5rem; + } + blockquote { + border-left: solid 4px #ffffff; + font-style: italic; + margin: 0 0 2rem 0; + padding: 0.5rem 0 0.5rem 2rem; + } + code { + background: rgba(255, 255, 255, 0.075); + border-radius: 4px; + font-family: "Courier New", monospace; + font-size: 0.9rem; + margin: 0 0.25rem; + padding: 0.25rem 0.65rem; + } + pre { + -webkit-overflow-scrolling: touch; + font-family: "Courier New", monospace; + font-size: 0.9rem; + margin: 0 0 2rem 0; + } + pre code { + display: block; + line-height: 1.75; + padding: 1rem 1.5rem; + overflow-x: auto; + } + hr { + border: 0; + border-bottom: solid 1px #ffffff; + margin: 2.75rem 0; + } + .align-left { + text-align: left; + } + .align-center { + text-align: center; + } + .align-right { + text-align: right; + } +/* Form */ + form { + margin: 0 0 2.5rem 0; + } + form .field { + margin: 0 0 1.5rem 0; + } + form .field.half { + width: 50%; + float: left; + padding: 0 0 0 0.75rem; + } + form .field.half.first { + padding: 0 0.75rem 0 0; + } + form > .actions { + margin: 1.875rem 0 0 0 !important; + } + @media screen and (max-width: 736px) { + form .field { + margin: 0 0 1.125rem 0; + } + form .field.half { + padding: 0 0 0 0.5625rem; + } + form .field.half.first { + padding: 0 0.5625rem 0 0; + } + form > .actions { + margin: 1.5rem 0 0 0 !important; + } + } + @media screen and (max-width: 480px) { + form .field.half { + width: 100%; + float: none; + padding: 0; + } + form .field.half.first { + padding: 0; + } + } + label { + color: #ffffff; + display: block; + font-size: 0.8rem; + font-weight: 300; + letter-spacing: 0.2rem; + line-height: 1.5; + margin: 0 0 1rem 0; + text-transform: uppercase; + } + input[type="text"], + input[type="password"], + input[type="email"], + input[type="tel"], + select, + textarea { + -moz-appearance: none; + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + -moz-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; + -webkit-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; + -ms-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; + transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; + background: transparent; + border-radius: 4px; + border: solid 1px #ffffff; + color: inherit; + display: block; + outline: 0; + padding: 0 1rem; + text-decoration: none; + width: 100%; + } + input[type="text"]:invalid, + input[type="password"]:invalid, + input[type="email"]:invalid, + input[type="tel"]:invalid, + select:invalid, + textarea:invalid { + box-shadow: none; + } + input[type="text"]:focus, + input[type="password"]:focus, + input[type="email"]:focus, + input[type="tel"]:focus, + select:focus, + textarea:focus { + background: rgba(255, 255, 255, 0.075); + border-color: #ffffff; + box-shadow: 0 0 0 1px #ffffff; + } + select option { + background: #1b1f22; + color: #ffffff; + } + .select-wrapper { + text-decoration: none; + display: block; + position: relative; + } + .select-wrapper:before { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + font-family: FontAwesome; + font-style: normal; + font-weight: normal; + text-transform: none !important; + } + .select-wrapper:before { + color: #ffffff; + content: '\f107'; + display: block; + height: 2.75rem; + line-height: calc(2.75rem + 0em); + pointer-events: none; + position: absolute; + right: 0; + text-align: center; + top: 0; + width: 2.75rem; + } + .select-wrapper select::-ms-expand { + display: none; + } + input[type="text"], + input[type="password"], + input[type="email"], + select { + height: 2.75rem; + } + textarea { + padding: 0.75rem 1rem; + } + input[type="checkbox"], + input[type="radio"] { + -moz-appearance: none; + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + display: block; + float: left; + margin-right: -2rem; + opacity: 0; + width: 1rem; + z-index: -1; + } + input[type="checkbox"] + label, + input[type="radio"] + label { + text-decoration: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + color: #ffffff; + cursor: pointer; + display: inline-block; + font-size: 0.8rem; + font-weight: 300; + margin: 0 0 0.5rem 0; + padding-left: 2.65rem; + padding-right: 0.75rem; + position: relative; + } + input[type="checkbox"] + label:before, + input[type="radio"] + label:before { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + font-family: FontAwesome; + font-style: normal; + font-weight: normal; + text-transform: none !important; + } + input[type="checkbox"] + label:before, + input[type="radio"] + label:before { + -moz-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; + -webkit-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; + -ms-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; + transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; + border-radius: 4px; + border: solid 1px #ffffff; + content: ''; + display: inline-block; + height: 1.65rem; + left: 0; + line-height: calc(1.58125rem + 0em); + position: absolute; + text-align: center; + top: -0.125rem; + width: 1.65rem; + } + input[type="checkbox"]:checked + label:before, + input[type="radio"]:checked + label:before { + background: #ffffff !important; + border-color: #ffffff !important; + color: #1b1f22; + content: '\f00c'; + } + input[type="checkbox"]:focus + label:before, + input[type="radio"]:focus + label:before { + background: rgba(255, 255, 255, 0.075); + border-color: #ffffff; + box-shadow: 0 0 0 1px #ffffff; + } + input[type="checkbox"] + label:before { + border-radius: 4px; + } + input[type="radio"] + label:before { + border-radius: 100%; + } + ::-webkit-input-placeholder { + color: rgba(255, 255, 255, 0.5) !important; + opacity: 1.0; + } + :-moz-placeholder { + color: rgba(255, 255, 255, 0.5) !important; + opacity: 1.0; + } + ::-moz-placeholder { + color: rgba(255, 255, 255, 0.5) !important; + opacity: 1.0; + } + :-ms-input-placeholder { + color: rgba(255, 255, 255, 0.5) !important; + opacity: 1.0; + } + .formerize-placeholder { + color: rgba(255, 255, 255, 0.5) !important; + opacity: 1.0; + } +/* Box */ + .box { + border-radius: 4px; + border: solid 1px #ffffff; + margin-bottom: 2rem; + padding: 1.5em; + } + .box > :last-child, + .box > :last-child > :last-child, + .box > :last-child > :last-child > :last-child { + margin-bottom: 0; + } + .box.alt { + border: 0; + border-radius: 0; + padding: 0; + } +/* Icon */ + .icon { + text-decoration: none; + border-bottom: none; + position: relative; + } + .icon:before { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + font-family: FontAwesome; + font-style: normal; + font-weight: normal; + text-transform: none !important; + } + .icon > .label { + display: none; + } +/* Image */ + .image { + border-radius: 4px; + border: 0; + display: inline-block; + position: relative; + } + .image:before { + -moz-pointer-events: none; + -webkit-pointer-events: none; + -ms-pointer-events: none; + pointer-events: none; + background-color: rgba(19, 21, 25, 0.5); + border-radius: 4px; + content: ''; + display: block; + height: 100%; + left: 0; + opacity: 0.5; + position: absolute; + top: 0; + width: 100%; + } + .image img { + border-radius: 4px; + display: block; + } + .image.left, .image.right { + max-width: 40%; + } + .image.left img, .image.right img { + width: 100%; + } + .image.left { + float: left; + padding: 0 1.5em 1em 0; + top: 0.25em; + } + .image.right { + float: right; + padding: 0 0 1em 1.5em; + top: 0.25em; + } + .image.fit { + display: block; + margin: 0 0 2rem 0; + width: 100%; + } + .image.fit img { + width: 100%; + } + .image.main { + display: block; + margin: 2.5rem 0; + width: 100%; + } + .image.main img { + width: 100%; + } + @media screen and (max-width: 736px) { + .image.main { + margin: 2rem 0; + } + } + @media screen and (max-width: 480px) { + .image.main { + margin: 1.5rem 0; + } + } +/* List */ + ol { + list-style: decimal; + margin: 0 0 2rem 0; + padding-left: 1.25em; + } + ol li { + padding-left: 0.25em; + } + ul { + list-style: disc; + margin: 0 0 2rem 0; + padding-left: 1em; + } + ul li { + padding-left: 0.5em; + } + ul.alt { + list-style: none; + padding-left: 0; + } + ul.alt li { + border-top: solid 1px #ffffff; + padding: 0.5em 0; + } + ul.alt li:first-child { + border-top: 0; + padding-top: 0; + } + ul.icons { + cursor: default; + list-style: none; + padding-left: 0; + } + ul.icons li { + display: inline-block; + padding: 0 0.75em 0 0; + } + ul.icons li:last-child { + padding-right: 0; + } + ul.icons li a { + border-radius: 100%; + box-shadow: inset 0 0 0 1px #ffffff; + display: inline-block; + height: 2.25rem; + line-height: 2.25rem; + text-align: center; + width: 2.25rem; + } + ul.icons li a:hover { + background-color: rgba(255, 255, 255, 0.075); + } + ul.icons li a:active { + background-color: rgba(255, 255, 255, 0.175); + } + ul.actions { + cursor: default; + list-style: none; + padding-left: 0; + } + ul.actions li { + display: inline-block; + padding: 0 1rem 0 0; + vertical-align: middle; + } + ul.actions li:last-child { + padding-right: 0; + } + ul.actions.small li { + padding: 0 0.5rem 0 0; + } + ul.actions.vertical li { + display: block; + padding: 1rem 0 0 0; + } + ul.actions.vertical li:first-child { + padding-top: 0; + } + ul.actions.vertical li > * { + margin-bottom: 0; + } + ul.actions.vertical.small li { + padding: 0.5rem 0 0 0; + } + ul.actions.vertical.small li:first-child { + padding-top: 0; + } + ul.actions.fit { + display: table; + margin-left: -1rem; + padding: 0; + table-layout: fixed; + width: calc(100% + 1rem); + } + ul.actions.fit li { + display: table-cell; + padding: 0 0 0 1rem; + } + ul.actions.fit li > * { + margin-bottom: 0; + } + ul.actions.fit.small { + margin-left: -0.5rem; + width: calc(100% + 0.5rem); + } + ul.actions.fit.small li { + padding: 0 0 0 0.5rem; + } + @media screen and (max-width: 480px) { + ul.actions { + margin: 0 0 2rem 0; + } + ul.actions li { + padding: 1rem 0 0 0; + display: block; + text-align: center; + width: 100%; + } + ul.actions li:first-child { + padding-top: 0; + } + ul.actions li > * { + width: 100%; + margin: 0 !important; + } + ul.actions li > *.icon:before { + margin-left: -2em; + } + ul.actions.small li { + padding: 0.5rem 0 0 0; + } + ul.actions.small li:first-child { + padding-top: 0; + } + } + dl { + margin: 0 0 2rem 0; + } + dl dt { + display: block; + font-weight: 600; + margin: 0 0 1rem 0; + } + dl dd { + margin-left: 2rem; + } +/* Table */ + .table-wrapper { + -webkit-overflow-scrolling: touch; + overflow-x: auto; + } + table { + margin: 0 0 2rem 0; + width: 100%; + } + table tbody tr { + border: solid 1px #ffffff; + border-left: 0; + border-right: 0; + } + table tbody tr:nth-child(2n + 1) { + background-color: rgba(255, 255, 255, 0.075); + } + table td { + padding: 0.75em 0.75em; + } + table th { + color: #ffffff; + font-size: 0.9em; + font-weight: 600; + padding: 0 0.75em 0.75em 0.75em; + text-align: left; + } + table thead { + border-bottom: solid 2px #ffffff; + } + table tfoot { + border-top: solid 2px #ffffff; + } + table.alt { + border-collapse: separate; + } + table.alt tbody tr td { + border: solid 1px #ffffff; + border-left-width: 0; + border-top-width: 0; + } + table.alt tbody tr td:first-child { + border-left-width: 1px; + } + table.alt tbody tr:first-child td { + border-top-width: 1px; + } + table.alt thead { + border-bottom: 0; + } + table.alt tfoot { + border-top: 0; + } +/* Button */ + input[type="submit"], + input[type="reset"], + input[type="button"], + button, + .button { + -moz-appearance: none; + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + -moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + background-color: transparent; + border-radius: 4px; + border: 0; + box-shadow: inset 0 0 0 1px #ffffff; + color: #ffffff !important; + cursor: pointer; + display: inline-block; + font-size: 0.8rem; + font-weight: 300; + height: 2.75rem; + letter-spacing: 0.2rem; + line-height: 2.75rem; + outline: 0; + padding: 0 1.25rem 0 1.35rem; + text-align: center; + text-decoration: none; + text-transform: uppercase; + white-space: nowrap; + } + input[type="submit"]:hover, + input[type="reset"]:hover, + input[type="button"]:hover, + button:hover, + .button:hover { + background-color: rgba(255, 255, 255, 0.075); + } + input[type="submit"]:active, + input[type="reset"]:active, + input[type="button"]:active, + button:active, + .button:active { + background-color: rgba(255, 255, 255, 0.175); + } + input[type="submit"].icon:before, + input[type="reset"].icon:before, + input[type="button"].icon:before, + button.icon:before, + .button.icon:before { + margin-right: 0.5em; + } + input[type="submit"].fit, + input[type="reset"].fit, + input[type="button"].fit, + button.fit, + .button.fit { + display: block; + margin: 0 0 1rem 0; + width: 100%; + } + input[type="submit"].special, + input[type="reset"].special, + input[type="button"].special, + button.special, + .button.special { + background-color: #ffffff; + color: #1b1f22 !important; + font-weight: 600; + } + input[type="submit"].disabled, input[type="submit"]:disabled, + input[type="reset"].disabled, + input[type="reset"]:disabled, + input[type="button"].disabled, + input[type="button"]:disabled, + button.disabled, + button:disabled, + .button.disabled, + .button:disabled { + -moz-pointer-events: none; + -webkit-pointer-events: none; + -ms-pointer-events: none; + pointer-events: none; + cursor: default; + opacity: 0.25; + } + input[type="submit"], + input[type="reset"], + input[type="button"], + button { + line-height: calc(2.75rem - 2px); + } +/* BG */ + #bg { + -moz-transform: scale(1.0); + -webkit-transform: scale(1.0); + -ms-transform: scale(1.0); + transform: scale(1.0); + -webkit-backface-visibility: hidden; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100vh; + z-index: 1; + } + #bg:before, #bg:after { + content: ''; + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + #bg:before { + -moz-transition: background-color 2.5s ease-in-out; + -webkit-transition: background-color 2.5s ease-in-out; + -ms-transition: background-color 2.5s ease-in-out; + transition: background-color 2.5s ease-in-out; + -moz-transition-delay: 0.75s; + -webkit-transition-delay: 0.75s; + -ms-transition-delay: 0.75s; + transition-delay: 0.75s; + background-size: auto, 256px 256px; + background-position: center, center; + background-repeat: no-repeat, repeat; + z-index: 2; + } + #bg:after { + -moz-transform: scale(1.125); + -webkit-transform: scale(1.125); + -ms-transform: scale(1.125); + transform: scale(1.125); + -moz-transition: -moz-transform 0.325s ease-in-out, -moz-filter 0.325s ease-in-out; + -webkit-transition: -webkit-transform 0.325s ease-in-out, -webkit-filter 0.325s ease-in-out; + -ms-transition: -ms-transform 0.325s ease-in-out, -ms-filter 0.325s ease-in-out; + transition: transform 0.325s ease-in-out, filter 0.325s ease-in-out; + background-image: url("../images/bg.png"); + background-position: center; + background-size: cover; + background-repeat: no-repeat; + z-index: 1; + } + body.is-article-visible #bg:after { + -moz-transform: scale(1.0825); + -webkit-transform: scale(1.0825); + -ms-transform: scale(1.0825); + transform: scale(1.0825); + -moz-filter: blur(0.2rem); + -webkit-filter: blur(0.2rem); + -ms-filter: blur(0.2rem); + filter: blur(0.2rem); + } + body.is-loading #bg:before { + background-color: #000000; + } +/* Wrapper */ + #wrapper { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + -moz-flex-direction: column; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -moz-align-items: center; + -webkit-align-items: center; + -ms-align-items: center; + align-items: center; + -moz-justify-content: space-between; + -webkit-justify-content: space-between; + -ms-justify-content: space-between; + justify-content: space-between; + position: relative; + min-height: 100vh; + width: 100%; + padding: 4rem 2rem; + z-index: 3; + } + #wrapper:before { + content: ''; + display: block; + } + @media screen and (max-width: 1680px) { + #wrapper { + padding: 3rem 2rem; + } + } + @media screen and (max-width: 736px) { + #wrapper { + padding: 2rem 1rem; + } + } + @media screen and (max-width: 480px) { + #wrapper { + padding: 1rem; + } + } +/* Header */ + #header { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + -moz-flex-direction: column; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -moz-align-items: center; + -webkit-align-items: center; + -ms-align-items: center; + align-items: center; + -moz-transition: -moz-transform 0.325s ease-in-out, -moz-filter 0.325s ease-in-out, opacity 0.325s ease-in-out; + -webkit-transition: -webkit-transform 0.325s ease-in-out, -webkit-filter 0.325s ease-in-out, opacity 0.325s ease-in-out; + -ms-transition: -ms-transform 0.325s ease-in-out, -ms-filter 0.325s ease-in-out, opacity 0.325s ease-in-out; + transition: transform 0.325s ease-in-out, filter 0.325s ease-in-out, opacity 0.325s ease-in-out; + max-width: 100%; + text-align: center; + } + #header > * { + -moz-transition: opacity 0.325s ease-in-out; + -webkit-transition: opacity 0.325s ease-in-out; + -ms-transition: opacity 0.325s ease-in-out; + transition: opacity 0.325s ease-in-out; + position: relative; + margin-top: 3.5rem; + } + #header > *:before { + content: ''; + display: block; + position: absolute; + top: calc(-3.5rem - 1px); + left: calc(50% - 1px); + width: 1px; + height: calc(3.5rem + 1px); + background: #ffffff; + } + #header > :first-child { + margin-top: 0; + } + #header > :first-child:before { + display: none; + } + #header .logo { + width: 5.5rem; + height: 5.5rem; + line-height: 5.5rem; + border: solid 1px #ffffff; + border-radius: 100%; + } + #header .logo .icon:before { + font-size: 2rem; + } + #header .content { + border-style: solid; + border-color: #ffffff; + border-top-width: 1px; + border-bottom-width: 1px; + max-width: 100%; + } + #header .content .inner { + -moz-transition: max-height 0.75s ease, padding 0.75s ease, opacity 0.325s ease-in-out; + -webkit-transition: max-height 0.75s ease, padding 0.75s ease, opacity 0.325s ease-in-out; + -ms-transition: max-height 0.75s ease, padding 0.75s ease, opacity 0.325s ease-in-out; + transition: max-height 0.75s ease, padding 0.75s ease, opacity 0.325s ease-in-out; + -moz-transition-delay: 0.25s; + -webkit-transition-delay: 0.25s; + -ms-transition-delay: 0.25s; + transition-delay: 0.25s; + padding: 3rem 2rem; + max-height: 40rem; + overflow: hidden; + } + #header .content .inner > :last-child { + margin-bottom: 0; + } + #header .content p { + text-transform: uppercase; + letter-spacing: 0.2rem; + font-size: 0.8rem; + line-height: 2; + } + #header nav ul { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + margin-bottom: 0; + list-style: none; + padding-left: 0; + border: solid 1px #ffffff; + border-radius: 4px; + } + #header nav ul li { + padding-left: 0; + border-left: solid 1px #ffffff; + } + #header nav ul li:first-child { + border-left: 0; + } + #header nav ul li a { + display: block; + min-width: 7.5rem; + height: 2.75rem; + line-height: 2.75rem; + padding: 0 1.25rem 0 1.45rem; + text-transform: uppercase; + letter-spacing: 0.2rem; + font-size: 0.8rem; + border-bottom: 0; + } + #header nav ul li a:hover { + background-color: rgba(255, 255, 255, 0.075); + } + #header nav ul li a:active { + background-color: rgba(255, 255, 255, 0.175); + } + #header nav.use-middle:after { + content: ''; + display: block; + position: absolute; + top: 0; + left: calc(50% - 1px); + width: 1px; + height: 100%; + background: #ffffff; + } + #header nav.use-middle ul li.is-middle { + border-left: 0; + } + body.is-article-visible #header { + -moz-transform: scale(0.95); + -webkit-transform: scale(0.95); + -ms-transform: scale(0.95); + transform: scale(0.95); + -moz-filter: blur(0.1rem); + -webkit-filter: blur(0.1rem); + -ms-filter: blur(0.1rem); + filter: blur(0.1rem); + opacity: 0; + } + body.is-loading #header { + -moz-filter: blur(0.125rem); + -webkit-filter: blur(0.125rem); + -ms-filter: blur(0.125rem); + filter: blur(0.125rem); + } + body.is-loading #header > * { + opacity: 0; + } + body.is-loading #header .content .inner { + max-height: 0; + padding-top: 0; + padding-bottom: 0; + opacity: 0; + } + @media screen and (max-width: 980px) { + #header .content p br { + display: none; + } + } + @media screen and (max-width: 736px) { + #header > * { + margin-top: 2rem; + } + #header > *:before { + top: calc(-2rem - 1px); + height: calc(2rem + 1px); + } + #header .logo { + width: 4.75rem; + height: 4.75rem; + line-height: 4.75rem; + } + #header .logo .icon:before { + font-size: 1.75rem; + } + #header .content .inner { + padding: 2.5rem 1rem; + } + #header .content p { + line-height: 1.875; + } + } + @media screen and (max-width: 680px) { + #header { + padding: 1.5rem 0; + } + #header .content .inner { + padding: 2.5rem 0; + } + #header nav ul { + -moz-flex-direction: column; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + min-width: 10rem; + max-width: 100%; + } + #header nav ul li { + border-left: 0; + border-top: solid 1px #ffffff; + } + #header nav ul li:first-child { + border-top: 0; + } + #header nav ul li a { + height: 3rem; + line-height: 3rem; + min-width: 0; + width: 100%; + } + #header nav.use-middle:after { + display: none; + } + } +/* Main */ + #main { + -moz-flex-grow: 1; + -webkit-flex-grow: 1; + -ms-flex-grow: 1; + flex-grow: 1; + -moz-flex-shrink: 1; + -webkit-flex-shrink: 1; + -ms-flex-shrink: 1; + flex-shrink: 1; + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + -moz-align-items: center; + -webkit-align-items: center; + -ms-align-items: center; + align-items: center; + -moz-justify-content: center; + -webkit-justify-content: center; + -ms-justify-content: center; + justify-content: center; + -moz-flex-direction: column; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + position: relative; + max-width: 100%; + z-index: 3; + } + #main article { + -moz-transform: translateY(0.25rem); + -webkit-transform: translateY(0.25rem); + -ms-transform: translateY(0.25rem); + transform: translateY(0.25rem); + -moz-transition: opacity 0.325s ease-in-out, -moz-transform 0.325s ease-in-out; + -webkit-transition: opacity 0.325s ease-in-out, -webkit-transform 0.325s ease-in-out; + -ms-transition: opacity 0.325s ease-in-out, -ms-transform 0.325s ease-in-out; + transition: opacity 0.325s ease-in-out, transform 0.325s ease-in-out; + padding: 4.5rem 2.5rem 1.5rem 2.5rem ; + position: relative; + width: 40rem; + max-width: 100%; + background-color: rgba(27, 31, 34, 0.85); + border-radius: 4px; + opacity: 0; + } + #main article.active { + -moz-transform: translateY(0); + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + opacity: 1; + } + #main article .close { + display: block; + position: absolute; + top: 0; + right: 0; + width: 4rem; + height: 4rem; + cursor: pointer; + text-indent: 4rem; + overflow: hidden; + white-space: nowrap; + } + #main article .close:before { + -moz-transition: background-color 0.2s ease-in-out; + -webkit-transition: background-color 0.2s ease-in-out; + -ms-transition: background-color 0.2s ease-in-out; + transition: background-color 0.2s ease-in-out; + content: ''; + display: block; + position: absolute; + top: 0.75rem; + left: 0.75rem; + width: 2.5rem; + height: 2.5rem; + border-radius: 100%; + background-position: center; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='20px' height='20px' viewBox='0 0 20 20' zoomAndPan='disable'%3E%3Cstyle%3Eline %7B stroke: %23ffffff%3B stroke-width: 1%3B %7D%3C/style%3E%3Cline x1='2' y1='2' x2='18' y2='18' /%3E%3Cline x1='18' y1='2' x2='2' y2='18' /%3E%3C/svg%3E"); + background-size: 20px 20px; + background-repeat: no-repeat; + } + #main article .close:hover:before { + background-color: rgba(255, 255, 255, 0.075); + } + #main article .close:active:before { + background-color: rgba(255, 255, 255, 0.175); + } + @media screen and (max-width: 736px) { + #main article { + padding: 3.5rem 2rem 0.5rem 2rem ; + } + #main article .close:before { + top: 0.875rem; + left: 0.875rem; + width: 2.25rem; + height: 2.25rem; + background-size: 14px 14px; + } + } + @media screen and (max-width: 480px) { + #main article { + padding: 3rem 1.5rem 0.5rem 1.5rem ; + } + } +/* Footer */ + #footer { + -moz-transition: -moz-transform 0.325s ease-in-out, -moz-filter 0.325s ease-in-out, opacity 0.325s ease-in-out; + -webkit-transition: -webkit-transform 0.325s ease-in-out, -webkit-filter 0.325s ease-in-out, opacity 0.325s ease-in-out; + -ms-transition: -ms-transform 0.325s ease-in-out, -ms-filter 0.325s ease-in-out, opacity 0.325s ease-in-out; + transition: transform 0.325s ease-in-out, filter 0.325s ease-in-out, opacity 0.325s ease-in-out; + width: 100%; + max-width: 100%; + margin-top: 2rem; + text-align: center; + } + #footer .copyright { + letter-spacing: 0.2rem; + font-size: 0.6rem; + opacity: 0.75; + margin-bottom: 0; + text-transform: uppercase; + } + body.is-article-visible #footer { + -moz-transform: scale(0.95); + -webkit-transform: scale(0.95); + -ms-transform: scale(0.95); + transform: scale(0.95); + -moz-filter: blur(0.1rem); + -webkit-filter: blur(0.1rem); + -ms-filter: blur(0.1rem); + filter: blur(0.1rem); + opacity: 0; + } + body.is-loading #footer { + opacity: 0; + } \ No newline at end of file diff --git a/template/page/index.php b/template/page/index.php new file mode 100644 index 0000000..696bdab --- /dev/null +++ b/template/page/index.php @@ -0,0 +1,48 @@ + + + + + + <?php echo $conf['title']?> + + + + + + + +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/template/page/theme.ini b/template/page/theme.ini new file mode 100644 index 0000000..79f51ab --- /dev/null +++ b/template/page/theme.ini @@ -0,0 +1,8 @@ +{ + "author_name": "六零", + "author_link": "https://gitee.com/lylme", + "theme_name": "mpage", + "theme_version": "1.0", + "theme_explain": "极简个人主页主题", + "theme_demo": "https://spage.lylme.com/theme/page" +} \ No newline at end of file diff --git a/template/quality/css/daohang.css b/template/quality/css/daohang.css new file mode 100644 index 0000000..90afb43 --- /dev/null +++ b/template/quality/css/daohang.css @@ -0,0 +1,275 @@ + +.iconnav{ + position:fixed; + top:15vh; + left:0px; + list-style: none; + margin: 0; + padding: 0; + margin-left: 50px; + background-color: #0000008f; + display: flex; + flex-direction: column; + justify-content: space-between; + padding: 0.75rem; + border-radius: 10px; + box-shadow: 0 10px 50px 0 rgba(5, 4, 62, 0.25); + z-index: 9999; +} + +.iconnav li + li { + margin-top: 0.75rem; +} + +.type-left{ + display: none; + position:fixed; + top:10vh; + left:5px; + z-index: 9999; +} + +.iconnav a { + color: #FFF; + text-decoration: none; + display: flex; + align-items: center; + justify-content: center; + width: 3rem; + height: 3rem; + border-radius: 8px; + position: relative; +} +.iconnav a span { + position: absolute; + background-color: #000000cc; + white-space: nowrap; + padding: 0.5rem 1rem; + border-radius: 6px; + left: calc(100% + 1.5rem); + transform-origin: center left; + transform: scale(0); + opacity: 0; + transition: 0.15s ease; +} + +/*.iconnav li:nth-child(9) {*/ +/* padding-top: 0.75rem;*/ +/* border-top: 1px solid #fff;*/ +/*}*/ + +.iconnav hr { + margin-top: 0rem; + margin-bottom: 0rem; + margin: 5px; + border: 0; + border-top: 1px solid rgb(255 255 255 / 70%); +} + +@media screen and (max-width: 1350px) { +.iconnav{ + display: none; + margin-left: 2px; + padding: 0rem; + top:15vh; + width:60px; +} + +.iconnav li + li { + margin: 0.1rem; +} + +.type-left{ + display: block; +} + +.iconnav li svg.icon { + margin: 0; +} + +.iconnav a { + width: auto; + height: 40px; +} + + +.iconnav a span { + left: calc(100% + 0.5rem); +} + +.iconnav li:nth-child(9) { + width: 80%; + margin: auto; +} + +.type-left svg{ + width: 35px; + height: 35px; + margin: auto; +} +} + +.iconnavblock{ + display: block; +} + +.iconnav a:hover, .iconnav a:focus, .iconnav a.active { + background-color: #00000080; + outline: 0; +} +.iconnav a:hover span, .iconnav a:focus span, .iconnav a.active span { + transform: scale(1); + opacity: 1; +} +.iconnav a i { + font-size: 1.375rem; +} +.iconnav a span:before { + content: ""; + display: block; + width: 12px; + height: 12px; + position: absolute; + background-color: #000000cc; + left: -5px; + top: 50%; + transform: translatey(-50%) rotate(45deg); + border-radius: 3px; +} + + +@-webkit-keyframes scale { + 0% { + transform: scale(0); + } + 100% { + transform: scale(1); + } +} + +@keyframes scale { + 0% { + transform: scale(0); + } + 100% { + transform: scale(1); + } +} + +@media screen and (max-width: 1350px) { +[data-v-db6ccf64] { + left: -45px !important; +} + +.wv-top-backdrop[data-v-db6ccf64] { + margin-left: 45px !important; +} + +.wv-top-col-12[data-v-db6ccf64] { + position: initial !important; +} +} + +/*首页横幅开始*/ +.alert-warning { + color: #664d03; + background-color: #fff3cd; + border-color: #ffecb5; +} +.alert-dismissible { + padding-right: 3rem; +} +.alert { + position: relative; + padding: 1rem 1rem; + margin-bottom: 1rem; + border: 1px solid transparent; + border-radius: .25rem; +} +@media (prefers-reduced-motion: reduce){ +.fade { + transition: none; +} +} +.fade { + transition: opacity .15s linear; +} +.bg-danger { + background-color: #dc3545!important; +}.badge { + display: inline-block; + padding: .35em .65em; + font-size: .75em; + font-weight: 700; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25rem; +} +.bg-warning { + background-color: #ffc107!important; +} +.text-dark { + color: #212529!important; +}.alert-dismissible .btn-close { + position: absolute; + top: 0; + right: 0; + z-index: 2; + padding: 1.25rem 1rem; +} +.btn-close { + box-sizing: content-box; + width: 1em; + height: 1em; + padding: .25em .25em; + color: #000; + border: 0; + border-radius: .25rem; + opacity: .5; +} +@media (prefers-reduced-motion: reduce){ +.spinner-border, .spinner-grow { + -webkit-animation-duration: 1.5s; + animation-duration: 1.5s; +} +} +.spinner-grow-sm { + width: 1rem; + height: 1rem; +}.spinner-grow { + display: inline-block; + width: 2rem; + height: 2rem; + vertical-align: -.125em; + background-color: currentColor; + border-radius: 50%; + opacity: 0; + -webkit-animation: .75s linear infinite spinner-grow; + animation: .75s linear infinite spinner-grow; +}.small, small { + font-size: .875em; +} +@keyframes spinner-grow { + 0% { + transform: scale(0); + } + 50% { + opacity: 1; + transform: none; + } +} +.btn-close:hover { + color: #000; + text-decoration: none; + opacity: .75; +} +sup.spinner-grow.spinner-grow-sm.ml-1.small { + + margin-left: 4px; + + margin-bottom: 4px; +} +/*首页横幅结束*/ \ No newline at end of file diff --git a/template/quality/css/style.css b/template/quality/css/style.css new file mode 100644 index 0000000..83632d1 --- /dev/null +++ b/template/quality/css/style.css @@ -0,0 +1,738 @@ +#search-text +{ + /* backdrop-filter: saturate(100%) blur(10px); */ + border: 0; + width: 80%; + /*height: 60px; */ + /* line-height: 50px; */ + /* text-indent: 10px; */ + font-size: 12px; + color: #fff; + /* border-radius: 15px; */ + background: 0; + /* transition: 0.3s all linear; */ + /* padding-left: 20px; */ + /* box-shadow: 0px 2px 12px 0px rgb(34 34 38 / 10%); */ +} +li.nav-item a { + color: #fff !important; +} +#search-lylme +{ + text-align: initial; + backdrop-filter: saturate(100%) blur(10px); + border: 0; + width: 100%; + margin-bottom: 5px; + line-height: 50px; + text-indent: 10px; + font-size: 18px; + color: #222226; + border-radius: 15px; + background: rgba(0, 0, 0, 0.58); + transition: 0.3s all linear; + padding-left: 10px; + box-shadow: 0px 2px 12px 0px rgb(34 34 38 / 10%); +} + +#search-text::-webkit-input-placeholder +{ + color: #555666; + font-size: 12px; +} + +#search-submit +{ + position: absolute; + top: 0; + right: 0; + background: none; + border: 0; + /* border-radius: 20px; */ + width: auto; + /*height: 60px;*/ + border-radius: 0 10px 10px 0; + outline: none; + /* background-color: #4e6ef2; */ +} + +#search-submit:hover +{ + background-color: rgba(255, 255, 255, 0.342) +} + +.search-box +{ + justify-content: center; + align-items: center; + /*height: 60px;*/ +} + +#main +{ + text-shadow: 0px 0px 3px rgb(0 0 0 / 70%); + text-align: center; + color: white; + font-weight: bold; +} + +#show_time +{ + font-size: 80px; +} + +#show_date +{ + margin-bottom: 16px; + font-size: 18px; + color: #fff; +} + +#checke-so +{ + display: inline; +} + +a:hover +{ + text-decoration: none !important; + font-weight: bold !important +} + +a.icp +{ + font-size: 12px; + color: #bbb; + text-align: center +} + +.navbar .navbar-expand-lg .navbar-light .fixed-top +{ + position: absolute; + z-index: 10000 +} + +.bottom-cover +{ + background-image: linear-gradient(rgba(255,255,255,0) 0%,rgb(244 248 251 / 0.6) 50%,rgb(244 248 251) 100%) +} + +.navbar-light .navbar-toggler +{ + color: #fff !important; + right: 0; + top: 10px; + position: fixed; +} + +p.content +{ + text-align: center; + padding: 5px 30px; + border-radius: 10px; + font-size: 12px; + color: #fff; + font-weight: 500 +} + +::-webkit-scrollbar +{ + display: none +} + +.back-to +{ + bottom: 55px; + overflow: hidden; + position: fixed; + right: 10px; + width: 110px; + z-index: 999 +} + +.back-to .back-top +{ + background: url("./images/top.png") no-repeat scroll 0 0 transparent; + display: block; + float: right; + height: 50px; + margin-left: 10px; + outline: 0 none; + text-indent: -9999em; + width: 50px +} + +.back-to .back-top:hover +{ + background-position: -50px 0 +} + +.mylist li.lylme-3 img +{ + display: block; + width: 45px; + height: 45px; + padding: 1px; + background: #fff; + border: 1px solid #eee; + border-radius: 10px; + margin: 20px auto 5px auto; +} + +h2.title +{ + text-align: center; + color: #fff; + font-size: 36px; + font-weight: 600; + text-shadow: 1px 1px 8px #504b4b +} + +body +{ + font-size: 14px; + background: #95aec5; + overflow-x: hidden; + background-repeat: no-repeat; + background-attachment: fixed; +} + +a +{ + text-decoration: none +} + +a:hover +{ + text-decoration: none +} + +svg.icon +{ + width: 20px; + height: 20px; + margin: 0 5px 0 8px; + /* vertical-align: -0.15em; */ + fill: currentColor; + overflow: hidden; +} + +svg.sw +{ + width: 16px; + height: 16px; + margin: 5px; +} + +svg.lylme +{ + width: 20px; + height: 20px; +} + +ul#chso +{ + position: inherit; + display: none; + top: 5px +} + +.navbar-light .navbar-nav .nav-link +{ + color: #fff !important; + font-size: 16px; + font-weight: bold; + text-shadow: 0px 1px 0px #000; + text-align: center; +} + +#search +{ + width: 100%; + margin: 0; + padding: 0 0 10px; + position: relative; + z-index: 2000; + border-radius: 5px +} + +#search form +{ + position: relative; + margin-top: 15px +} + +#search button i +{ + color: #ddd; + font-size: 18px +} + +.search-group +{ + text-align: center; +} + +.s-current .search-type +{ + padding-left: 0; + display: block +} + +.s-current +{ + display: block +} + +#search-list +{ + position: relative; + overflow-x: auto +} + +#search-list::-webkit-scrollbar +{ + display: none +} + +.s-type +{ + position: absolute; + top: 0; + left: 0; + z-index: 13; + width: 75px +} + +.s-type:hover +{ + height: auto +} + +.s-type>span +{ + display: block; + height: 31px; + width: 75px +} + +.s-type-list +{ + display: none; + position: absolute; + top: 31px; + padding: 9pt 0; + width: 70px; + background: #fff; + border-radius: 5px; + box-shadow: 0 9px 20px rgba(0,0,0,.16) +} + +.s-type-list:before +{ + position: absolute; + top: -1pc; + left: 20px; + content: ''; + display: block; + width: 0; + height: 0; + border: 10px solid transparent; + border-bottom-color: #fff +} + +.s-type-list label +{ + display: block; + font-size: 15px; + text-align: center; + font-weight: normal; + margin-bottom: 0; + padding: 2px 0; + cursor: pointer; + transition: .3s +} + +.s-type-list label:hover +{ + background: rgba(136,136,136,.1) +} + +.s-type-list .tile-lg +{ + color: #fff; + width: 3pc; + height: 3pc; + font-size: 1.25rem; + line-height: 3rem; + border-radius: .3rem; + display: block; + margin: auto +} + +.s-type:hover .s-type-list +{ + display: block +} + +.type-text +{ + position: absolute; + left: 0; + width: 75px; + padding-left: 9pt; + font-size: 1pc; + line-height: 31px +} + +.search-type +{ + white-space: nowrap; + margin: 0 +} + +.search-type label +{ + margin: 0 +} + +.search-type img +{ + width: 14px; + height: 14px; + margin: 0 5px 0 8px; + vertical-align: -0.15em; + fill: currentColor; + overflow: hidden; +} + +.search-type li +{ + margin-bottom: 10px; + display: inline-block; + background: #000000AD !important; + background: rgba(255,255,255,70%); + border-radius: 10px +} + +.search-type li label +{ + display: inline-block; + padding: 0px 14px 0px 4px; + font-size: 14px; + border-radius: 3px 3px 0 0; + cursor: pointer +} + +.search-type input:checked+label,.search-type input:hover+label +{ + background-color: #fff; + height: 50px; + border-radius: 10px +} + +#word +{ + backdrop-filter: blur(10px); + margin-top: 5px; + position: absolute; + list-style: none; + width: 100%; + background: rgba(0, 0, 0, 0.77); + border-radius: 15px; + z-index: 20000; + padding: 15px 0px; + box-shadow: 0 0 5px #000 +} + +#word li +{ + color: #fff; + height: 35px; + padding: 0 5px; + text-indent: 30px; + background-size: 20px; + line-height: 35px; + cursor: pointer; + font-size: 16px; + border-radius: 5px +} + +#word li:hover +{ + background-color: #2c60d3ba; +} + +.set-check +{ + position: absolute; +} + +.set-check label +{ + margin-left: 3px +} + +.set-check input,.set-check label +{ + opacity: 0; + transition: all .3s ease +} + +.search-type li +{ + height: 50px; + line-height: 50px; + list-style: none; + display: inline-block; + border-radius: 10px +} + +.mylist +{ + list-style: none; + position: relative; + z-index: 1000; +} + +.mylist li.lylme-3 +{ + width: 100px; + transition: 0.3s all linear; + font-size: 14px; + overflow: hidden; + /* padding: 10px; */ + box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.56); + backdrop-filter: saturate(100%) blur(30px); + margin: 10px; + /* display: flex; */ + flex-direction: row; + border-radius: 15px; + background: rgba(0, 0, 0, 0.41); +} + +.mylist li.lylme-3 svg +{ + display: block; + width: 45px; + height: 45px; + margin: 20px auto 5px auto; +} + +.mylist li.lylme-3:hover +{ + backdrop-filter: blur(0px); + transform: translateY(5px); +} + +.mylist li.lylme-3 span +{ + text-shadow: 0px 0px 3px rgb(0 0 0 / 70%); + margin-bottom: 10px; + width: 100%; + height: 26px; + line-height: 26px; + text-align: center; + font-size: 15px; + word-break: break-all; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden +} + +.mylist li a +{ + color: #fff; + display: block +} + +.mylist li.title +{ + width: 100%; + min-width: auto; + /* margin: 0; */ + height: 35px; + /* font-size: 16px; */ + line-height: 33px; + /* padding: 0 20px 0 10px; */ + /* border-bottom: 1px solid #eee; */ + margin-bottom: 10px; + margin-top: 20px; + font-size: 17px; + color: white; + font-weight: 600; +} + +.bottom-cover +{ + width: 100%; + height: 50%; + position: absolute; + bottom: -1px; + z-index: 10 +} + +@media screen and (min-width:1200px) +{ + .mylist li.lylme-3 + { + min-width: 112px + } +} + +@media screen and (min-width:992px) and (max-width:1200px) +{ + .mylist li.lylme-3 + { + min-width: 110px + } +} + +@media screen and (max-width:992px) +{ + #he-plugin-simple + { + /*display: none !important*/ + } + + #search-text + { + width: 60%; + } + + .mylist li.lylme-3 + { + width: 65px; + height: 65px; + margin: 5px; + } + + .search-group + { + padding-left: 0px + } + + div#navbarsExample05 + { + background: rgba(0,0,0,0.8); + padding: 10px 15px; + border-radius: 20px; + position: fixed; + top: 40px; + right: 10px; + } +.mylist li.lylme-3 img { + display: block; + width: 30px; + height: 30px; + padding: 1px; + background: #fff; + border: 1px solid #eee; + border-radius: 10px; + margin: 8px auto 0px auto; +} +} + +@media screen and (max-width:992px) +{ + #search-text + { + width: 60%; + } + + .s-type-list label + { + padding: 5px 0 + } + + .search-list + { + height: 30px; + overflow-y: hidden; + white-space: nowrap + } + + .search-group + { + padding-left: 0px + } + + .mylist + { + border-radius: 8px + } +/*.mylist li.lylme-3{margin:5px 0 5px}*/ + .mylist li.lylme-3 svg + { + width: 30px; + height: 30px; + margin: 8px auto auto; + } + + .mylist li.lylme-3 span + { + font-size: 10px + } +} + +.navbar-toggler svg +{ + width: 24px; + height: 24px; + margin:0; +} + +.navbar-toggler .bi-list-nested +{ + display: none +} + +.navbar-toggler.collapsed .bi-list-nested +{ + display: block +} + +.navbar-toggler.collapsed .bi-x +{ + display: none +} + +.navbar-toggler .bi-x +{ + display: block +} + +#he-plugin-simple +{ + z-index: 1000 +} + +::-webkit-scrollbar +{ + width: 8px; + height: 8px; + border-radius: 4px +} + +::-webkit-scrollbar-track +{ + background: #eee; + border-radius: 0px +} + +::-webkit-scrollbar-thumb +{ + background: #ddd; + border-radius: 0px +} + +::-webkit-scrollbar-thumb:hover +{ + background: #ccc +} + +::-webkit-scrollbar-corner +{ + background: #ddd +} \ No newline at end of file diff --git a/template/quality/gg.html b/template/quality/gg.html new file mode 100644 index 0000000..c065d61 --- /dev/null +++ b/template/quality/gg.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/template/quality/index.php b/template/quality/index.php new file mode 100644 index 0000000..db3c591 --- /dev/null +++ b/template/quality/index.php @@ -0,0 +1,204 @@ + + + + + + + <?php echo $conf['title']?> + + + + + + + + + + + + + + + + + + + + + + ';} + else{ echo '';}?> + + +
        + +
        + + + + +
        + + +
        + +
        +
        +
        + +
        +' . yan().'

        '; +} +?> + + + + + + '
          ', //分组开始标签 + 'g2' => '
        • {group_icon}{group_name}
        • ', //分组内容 + 'g3' => '
        ', //分组结束标签 + + 'l1' => '
      • ', //链接开始标签 + 'l2' => '{link_icon}{link_name}', //链接内容 + 'l3' => '
      • ', //链接结束标签 +); +lists($html); + ?> + + + + + + + diff --git a/template/quality/js/script.js b/template/quality/js/script.js new file mode 100644 index 0000000..a4d93d2 --- /dev/null +++ b/template/quality/js/script.js @@ -0,0 +1,188 @@ +//天气插件 +WIDGET={"CONFIG":{"modules":"12043","background":"5","tmpColor":"FFFFFF","tmpSize":"16","cityColor":"FFFFFF","citySize":"18","aqiColor":"FFFFFF","aqiSize":"16","weatherIconSize":"24","alertIconSize":"18","padding":"0px 0px 0px 0px","shadow":"0","language":"auto","fixed":"false","vertical":"center","horizontal":"center","right":"0","top":"0","key":"9d714f8dd6b94c7696f9cea8dc3ed1c5"}} + + +//输入框获取焦点 +window.onload= function () { + var text=document.getElementById('search-text'); + text.focus(); + +} +function lylme(){ + var up = document.getElementById('lylme-up'); + var down = document.getElementById('lylme-down'); + var lylme = document.getElementById('chso'); + var upsw = up.style.display; + var downsw = down.style.display; + if(upsw=='none'){ + up.style.display='inline'; + down.style.display='none'; + lylme.style.display='none'; + + + } + else{ + up.style.display='none'; + down.style.display='inline'; + lylme.style.display='contents'; + } + +} +$(document).on('click', '.search-type li', function(){ + var icon=$(this).find('svg').html() //|| $(this).find('img')[0].outerHTML; + $(".lylme").html(icon); +}); + $(document).click(function(e){ + var con = $('.collapse'); + if(!con.is(e.target)){ + con.toggleClass('show',false); + } + }); + +//关键词sug +$(function() { + //当键盘键被松开时发送Ajax获取数据 + $('#search-text').keyup(function() { + var keywords = $(this).val(); + if (keywords == '') { $('#word').hide(); return }; + $.ajax({ + url: 'https://suggestion.baidu.com/su?wd=' + keywords, + dataType: 'jsonp', + jsonp: 'cb', //回调函数的参数名(键值)key + // jsonpCallback: 'fun', //回调函数名(值) value + beforeSend: function() { + // $('#word').append('
      • 正在加载。。。
      • '); + }, + success: function(data) { + $('#word').empty().show(); + if (data.s == '') { + // $('#word').append('
        暂无 ' + keywords + ' 相关索引
        '); + $('#word').empty(); + $('#word').hide(); + } + $.each(data.s, function() { + $('#word').append('
      • ' + this + '
      • '); + }) + }, + error: function() { + $('#word').empty().show(); + //$('#word').append('
        Fail "' + keywords + '"
        '); + $('#word').hide(); + } + }) + }) + //点击搜索数据复制给搜索框 + $(document).on('click', '#word li', function() { + var word = $(this).text(); + $('#search-text').val(word); + $('#word').empty(); + $('#word').hide(); + //$("form").submit(); + $('.submit').trigger('click');//触发搜索事件 + }) + $(document).on('click', '.container,.banner-video,nav', function() { + $('#word').empty(); + $('#word').hide(); + }) + +}) + + + +//显示日期和时间 +function show() { + var date = new Date(); + var y = date.getFullYear(); //获取年份 + var m =date.getMonth()+1; //获取月份 返回0-11 + var d = date.getDate(); // 获取日 + var w = date.getDay(); //获取星期几 返回0-6 (0=星期天) + var ww = ' 星期'+'日一二三四五六'.charAt(new Date().getDay()) ;//星期几 + var format = [ + ("0" + date.getHours()).substr(-2), ("0" + date.getMinutes()).substr(-2) + ].join(":"); + + document.getElementById("show_date").innerHTML = y+"年"+m+"月"+d+"日 "+ww; + document.getElementById("show_time").innerHTML = format; + return show; +} +setInterval(show(), 500); + + +! +function() { + function g() { + h(), i(), j(), k() + } + function h() { + d.checked = s() + } + function i() { + var a = document.querySelector('input[name="type"][value="' + p() + '"]'); + a && (a.checked = !0, l(a)) + } + function j() { + v(u()) + } + function k() { + w(t()) + } + function l(a) { + for (var b = 0; b < e.length; b++) e[b].classList.remove("s-current"); + a.parentNode.parentNode.parentNode.classList.add("s-current") + } + function m(a, b) { + window.localStorage.setItem("superSearch" + a, b) + } + function n(a) { + return window.localStorage.getItem("superSearch" + a) + } + function o(a) { + f = a.target, v(u()), w(a.target.value), m("type", a.target.value), c.focus(), l(a.target) + } + function p() { + var b = n("type"); + return b || a[0].value + } + function q(a) { + m("newWindow", a.target.checked ? 1 : -1), x(a.target.checked) + } + function r(a) { + return a.preventDefault(), "" == c.value ? (c.focus(), !1) : (w(t() + c.value), x(s()), s() ? window.open(b.action, +new Date) : location.href = b.action, void 0) + } + function s() { + var a = n("newWindow"); + return a ? 1 == a : !0 + } + function t() { + return document.querySelector('input[name="type"]:checked').value + } + function u() { + return document.querySelector('input[name="type"]:checked').getAttribute("data-placeholder") + } + function v(a) { + c.setAttribute("placeholder", a); + document.getElementById('chso').style.display='none'; + document.getElementById('lylme-up').style.display='inline'; + document.getElementById('lylme-down').style.display='none'; + + } + function w(a) { + b.action = a + } + function x(a) { + a ? b.target = "_blank" : b.removeAttribute("target") + } + var y, a = document.querySelectorAll('input[name="type"]'), + b = document.querySelector("#super-search-fm"), + c = document.querySelector("#search-text"), + c = document.querySelector("#search-text"), + d = document.querySelector("#set-search-blank"), + e = document.querySelectorAll(".search-group"), + f = a[0]; + for (g(), y = 0; y < a.length; y++) a[y].addEventListener("change", o); + d.addEventListener("change", q), b.addEventListener("submit", r) + +}(); + +//返回顶部 +(function(a){a.fn.scrollToTop=function(c){var d={speed:800};c&&a.extend(d,{speed:c});return this.each(function(){var b=a(this);a(window).scroll(function(){100';$("body").append(ahtml);$("#toTop").scrollToTop(300);}); \ No newline at end of file diff --git a/template/quality/theme.ini b/template/quality/theme.ini new file mode 100644 index 0000000..bd73694 --- /dev/null +++ b/template/quality/theme.ini @@ -0,0 +1,8 @@ +{ + "author_name": "七夏", + "author_link": "https://www.52qxwl.cn/about/#开发日志", + "theme_name": "quality", + "theme_version": "1.0", + "theme_explain": "主题为公益开发,请不要随意泛滥,所有代码全部开源!", + "theme_demo": "https://www.52qxwl.cn/" +} \ No newline at end of file